hostname

Returns the Location object's URL's host.

Can be set, to navigate to the same URL with a changed host.

MDN Reference