hostname
Summary
Sets or retrieves the host name part of the location or URL.
Property of dom/Locationdom/Location
Syntax
var hostName = location.hostname;
location.hostname = hostName;
Return Value
Returns an object of type StringString
The host name component of the URL.
Notes
If no host name is available, this property returns an empty string.
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]