How to find out why a local redirect is happening?
Andrew Mclaughlin
A while ago I believe I added a local redirect for .dev domains to localhost. I can no longer visit any .dev domains in any browser on my Mac machine. However now I want to remove this redirect, since .dev is a real TLD.
But I can't figure out where the redirect logic is coming from.
My /etc/hosts file has no mention of it:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 figmadaemon.comAnd my /etc/resolv.conf doesn't either:
nameserver 192.168.1.1I've also tried clearing my DNS cache to no effect, with:
sudo killall -HUP mDNSResponderIs there anywhere else it could be coming from?
32 Answers
One common way on macOS to override the regular DNS for one (or a few) top-level domain(s) is to create a file in /etc/resolver/ (e.g. /etc/resolver/dev), and list an alternate server there. See this Mac OS X Hints item and this answer about using dnsmasq with .dev domains. If that's where the override is, just remove the file (you can leave the directory or remove it if you prefer).
What does your /etc/resolv.conf look like? Are you running anything like DNSMasq? I'd also recommend flushing your DNS cache if your /etc/hosts and resolv.conf are fine.
3