this post was submitted on 21 Nov 2026
8 points (100.0% liked)

Web Development

5973 readers
8 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 3 years ago
MODERATORS
 

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?

top 8 comments
sorted by: hot top controversial new old
[–] ElectricWaterfall@lemmy.zip 1 points 4 hours ago
[–] axidort@lemmy.world 5 points 18 hours ago

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 .test or .localhost. Both are reserved by RFC 6761, so they can never be registered by someone else and will never collide with a real site. .localhost also resolves to loopback by itself in most browsers, so myapp.localhost needs 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. .lan and .home are 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, so nas.home.arpa is 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, mkcert creates a local CA and certs for .test/.localhost names, trusted by your own browser, with no public domain required.

So: .localhost/.test plus mkcert on the dev box, and an owned domain with DNS-01 for anything you want proper certs on.

[–] damnthefilibuster@lemmy.world 5 points 1 day ago (2 children)

.local

Not for development, but for all hosting in my network.

[–] SteveTech@aussie.zone 7 points 1 day ago (1 children)

Just a fyi, .local is used for mDNS, using it for anything but that can break things.

[–] etchinghillside@reddthat.com 3 points 1 day ago

+1 – I started off with .lan but .local seems to be the standard that some devices will treat differently.

[–] furrowsofar@beehaw.org 3 points 1 day ago* (last edited 1 day ago)

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.

[–] Zachariah@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

I bought a .land domain because it’s is similar to .lan, but since I registered it, I am in control of its dns.