There’s the always trusty localhost, but some programs allow you to use any domain you like, what domain (including top level domain) do you use (when developing locally) and why?
A few things that haven’t come up yet, since a lot depends on whether you want it to be just for you or something that can get real HTTPS.
- For dev machines, use
.testor.localhost. Both are reserved by RFC 6761, so they can never be registered by someone else and will never collide with a real site..localhostalso resolves to loopback by itself in most browsers, somyapp.localhostneeds no hosts-file entry. - Avoid
.local. As mentioned above, it’s reserved for multicast DNS (RFC 6762), so on a lot of systems the lookup goes to mDNS instead of your DNS server and you get random slow or failing resolution..lanand.homeare popular but not reserved by any RFC, so a clash with real DNS is possible in principle. - For a home network, the standard answer is
home.arpa(RFC 8375). It’s reserved specifically for this, sonas.home.arpais safe. - If you want valid certificates on LAN hosts (phones and some apps refuse custom root CAs), buy a cheap domain and use subdomains of it for internal hosts. You don’t have to expose anything: use a DNS-01 challenge with Let’s Encrypt, which proves ownership through a TXT record instead of an inbound HTTP request, and it also supports wildcard certs. Point the names at private IPs via your local DNS.
- For purely local HTTPS on a dev machine,
mkcertcreates a local CA and certs for.test/.localhostnames, trusted by your own browser, with no public domain required.
So:
.localhost/.testplus mkcert on the dev box, and an owned domain with DNS-01 for anything you want proper certs on.- For dev machines, use
.local
Not for development, but for all hosting in my network.
Just a fyi, .local is used for mDNS, using it for anything but that can break things.
Avahi FTW
+1 – I started off with .lan but .local seems to be the standard that some devices will treat differently.
I purchased my own domain for stuff on my intranet, then use subdomains of that for my intranet hosts. I have a VPS on the internet I use to mint the certs with letsencrypt. Had to do it this way because android does not allow me to add my own root cert.
I bought a
.landdomain because it’s is similar to.lan, but since I registered it, I am in control of its dns.


