hostname is a property of both the Link
and the Location objects and specifies
the server name, subdomain and domain name (or IP address) of a URL.
Assuming your current window to be the URL...
...you could find out the hostname property as follows:
Although the hostname property can be set at any time, it is
safer to set the href property
to change a location.