Mojave Hosts File

hosts

Was there some new behavior around the /etc/hosts file in Mojave? Cannot get the thing to pick up any new entries which I make in the file. I am restarting the DNS resolver thingy, and I vetted my hosts file for weird characters using LC_ALL=C cat -vet /etc/hosts. No luck.

Best Answer

Looks like this is due to my records being added in the wrong place in the hosts file. I needed to put my entries above the 255.255.255.255 broadcasthost line. There's still some lingering issue about Chrome not using it, or maybe passing through to 8.8.8.8 for DNS if initial lookup fails. In Firefox my hosts file works as expected.