The .LOCALHOST Domain

Since 1999 Reserved
Domain for
Reserved to Prevent Use
Characters
3–63
Type
gTLD
Generic top-level domain

What is a .LOCALHOST domain?

.localhost is a reserved top-level domain that always refers to your own device. localhost names cannot be registered and are not part of the public internet.

Frequently asked questions about .LOCALHOST

Is localhost a domain?

Yes. localhost is a special-use top-level domain reserved for the local device. IANA lists .localhost as reserved and not delegated, so it is not part of the internet’s public DNS.

Source: IANA root zone database, checked 20 Nov 2026

What IP address does localhost point to?

The loopback address: 127.0.0.1 in IPv4 and ::1 in IPv6. It lets an application connect to another service running on the same device.

Source: IANA root zone database, checked 20 Nov 2026

Can I register a .localhost domain?

No. RFC 6761 forbids registries and registrars to register localhost names: they are defined by protocol and are not available for allocation.

Source: RFC 6761, checked 20 Nov 2026

Can I use names like myapp.localhost?

Yes. RFC 6761 covers localhost and every name ending in .localhost, so address queries for myapp.localhost should also return the loopback address.

Source: RFC 6761, checked 20 Nov 2026

What is localhost.localdomain?

A name some Linux systems use for the local machine. systemd’s nss-myhostname module, for example, resolves localhost.localdomain and names ending in .localhost.localdomain to 127.0.0.1 and ::1.

Source: systemd: nss-myhostname, checked 20 Nov 2026

Alternatives to .LOCALHOST

The cheapest first-year price for each ending

About the .LOCALHOST domain

localhost is widely used in software development and testing. RFC 6761 asks resolvers and DNS servers to answer localhost queries themselves, without querying other servers, to avoid needless load on the root servers.

Reserved since RFC 2606

RFC 2606 reserved .localhost together with .test, .example and .invalid. It noted that .localhost had traditionally pointed to the loopback address, and that any other use would conflict with widely deployed code.

In web browsers

Browsers may treat http://localhost pages as potentially trustworthy, so features limited to secure contexts can be tested without HTTPS. The W3C Secure Contexts specification allows this only if localhost never resolves to a non-loopback address.

Sources: IANA root zone database · RFC 6761 · systemd: nss-myhostname · RFC 2606 · W3C Secure Contexts. Facts checked .