HTML DOM Location hostname Property
The Location hostname property in HTML is used to return the hostname of the current URL. The Location hostname property returns a string that contains the domain name, or the IP address of a URL. Syntax: It returns the hostname property. location.hostname It is used to set the hostname property. lo