location: host プロパティ

hostLocation インターフェイスのプロパティで、ホスト、すなわちホスト名と、 URL のポート番号が空でなければ、 ':' およびそのポート番号の入った文字列です。

文字列です。

js
const anchor = document.createElement("a");

anchor.href = "https://developer.mozilla.org/en-US/Location.host";
console.log(anchor.host === "developer.mozilla.org");

anchor.href = "https://developer.mozilla.org:443/en-US/Location.host";
console.log(anchor.host === "developer.mozilla.org");
// 443 はこのスキームの既定のポートなので含まれない

anchor.href = "https://developer.mozilla.org:4097/en-US/Location.host";
console.log(anchor.host === "developer.mozilla.org:4097");

仕様書

Specification
HTML Standard
# dom-location-host-dev

ブラウザーの互換性

BCD tables only load in the browser