Why all *.dev domains target to my localhost?

Do a lookup for a TXT record at that name and things will become clearer :-)

.DEV is a recently registered top-level domain, and currently in an initial period where it's seeded with data meant to alert people using it privately that they're about to have a problem. Part of that is to return only the address 127.0.53.53, which is special enough to be obvious in log files and similar, but also in the 127.0.0.0/8 block that is defined as loopback for IPv4. Which is why you get your own machine. In a few months or so, you'll almost certainly start getting NXDOMAINs instead.


I have just suffered this exact issue and it was driving me crazy. I couldn't access any .dev domains on the web. Trying to load a .dev website was causing a security warning in Chrome because it was using a default self-signed certificate somewhere on my machine, resolving all .dev domains to 127.0.0.1.

If your operating system is Mac OS X, this might solve it, as it worked for me.

In Terminal, type this command:

cd /etc/resolver/ && ls

If you see an entry name dev when you hit the Enter key, then chances are this is a wildcard resolver pointing all your attempts to access .dev domains to 127.0.0.1, ie. localhost.

Simply renaming this gets rid of it. You need admin permissions so (assuming you are still in /etc/resolver/) run this command:

sudo mv dev dev.ignore

You should instantly be able to access .dev domains on the web.

If moving it doesn't work, you can try deleting it with sudo rm dev as a last resort.

Tags:

Dns