Use .test domains for local development

On this page

.test is a top-level domain reserved for testing (RFC 2606 and RFC 6761): it never exists on the public internet, so https://shop.test can only ever be your own project.

Why .test and not .local or .dev?

.local belongs to multicast DNS (Bonjour), so lookups can stall or go to other devices. .dev is a real domain that browsers force to HTTPS with certificates from the public web. .test is reserved for exactly this use.

How do .test names reach my computer?

On a Mac, setup installs /etc/resolver/test, which tells macOS to ask Short Leash's DNS server, on 127.0.0.1:5354, about any .test name. Short Leash answers with your own computer's address (127.0.0.1, or ::1 over IPv6) for every one, and its proxy on ports 80 and 443 picks the site by name. On Windows, one name resolution rule does the same.

Do subdomains work?

Yes. Every name under a site, such as api.shop.test, reaches shop.test. That's useful for multi-tenant apps and WordPress multisite.

Does it affect other domains?

No. Short Leash only answers for .test. Every other lookup goes to your normal DNS, untouched.

Why doesn't a .test name resolve?

Troubleshooting lists what to check, starting with whether setup has run.