CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer

A: The URL getHost() method returns the fully qualified domain name (FQDN). To get the registered domain name you would need to break the FQDN further to remove any subdomains. The example below uses the String lastIndexOf() method to get the index of the dot separators and substring() to extract codestyle.org from www.codestyle.org.

… full answer hidden

Click for full answers

Premium members click below for full answer
How do I get the registered domain name from a URL?

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager