I'm happy they don't: DNS queries should be routed to whatever I have in /etc/resolv.conf.
If I have a Pi-Hole or use 8.8.8.8, then *.localhost stuff should not be injected in some clever fashion.
If you happen to use 127.0.0.53 (or whatever) on Linux and 'magic' happens, that's on you. But the system should fiddle with things othwerise.
Windows 10 has it. Try `nslookup whatever.localhost`
** one.one.one.one can't find whatever.localhost: Non-existent domain
Tried on Win10Home 21H2 (19044.1766) and it doesn't work.
On Win10Enterprise 21H2 (19044.1706) it works.
I cannot find a documentation reference on the feature of resolving *.localhost
Sorry guys, it turned out that our corporate DNS server is giving the answers. Once I disconnected from VPN, no longer did it work :(
whatever.localhost/
I think .local and .localhost domains are working on my home network for more than five years, even with systems which do not run systemd-resolved as of today.
> The hostnames "localhost" and "localhost.localdomain" as well as any hostname ending in ".localhost" or ".localhost.localdomain" are resolved to the IP addresses 127.0.0.1 and ::1.
mDNS only uses the .local suffix but AFAIK it will never resolve anything to localhost on that domain. I'm pretty sure having a mDNS service that advertises a .local domain as 127.0.0.1 would really break things too if it serves that address up to other machines on your network.
Setup caddy as a reverse proxy and it will automatically inject a local CA cert into your browsers and auto provision local SSL certs too so you can access local services by names instead of ports, and everything happily works with SSL automagically.
I really, really wish windows and mac had a similar behavior to just route all *.localhost queries to localhost.