Local .test domains on Windows

localhost/blog breaks absolute URLs, cookies and redirects. A real name per project, such as blog.test, behaves like production. .test is reserved for exactly this and never exists on the internet.

How Lumina does it

  1. Every folder in the www folder becomes folder.test.
  2. Lumina writes the web server config for it (nginx or Apache), with the right document root: public, web or the folder itself.
  3. It adds the names to the Windows hosts file, with one administrator prompt when the list changes.

Set it up

  1. Install Lumina and a web server from Quick Add, then Start All.
  2. Create a folder in www, for example C:\Lumina\www\blog.
  3. Open http://blog.test. The Sites page lists every site and says whether the hosts file is up to date.

Another suffix

Prefer .localhost or your own suffix? Change Domain suffix on the Sites page. Avoid .dev and .app: they are real top-level domains that browsers force to HTTPS.

Questions

Why not .local?

It is used by mDNS (Bonjour), which can make lookups slow or fail. .test is reserved for testing.

Do phones on my Wi-Fi see these sites?

With "Share on my network" on the Sites page, yes, at an address like http://blog.192.168.1.20.nip.io, with a QR code.

Related guides