hostname
URL: hostname
From MDN: "The hostname property of the URL interface is a string containing the domain name of the URL."
Notes & further reading
Spec: URL Standard
MDN: URL.hostname
Differs from host because it never contains a port
Example value:
const url = new URL("https://elide.dev/?one=two#hello");
url.hostname;
← "elide.dev"
Content copied to clipboard
Note: This property is present on a mutable version of the URL
interface.