Hosts file weirdness

Trying to edit my /etc/hosts file to get a pre-launch site showing up properly in my browser, and it’s not working. I’ve done this dozens of times in the past, but not since the Catalina upgrade.

I did the

sudo vi /etc/hosts

thing, then the

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

thing, then when that didn’t work I even rebooted.

The browser isn’t directing the domain name to the new IP. Is there something I’m missing related to Catalina and the new security preferences?

Have you given Terminal full disk access?

1 Like

As @ismh is saying, you might want to verify that your new entries to the file has been successfully written to disk, using the cat command, but you probably did that already…

Still not on Catalina myself, so I can’t really test anything on my end yet.

1 Like

do a ping to the new IP address and to the “name” you have in /etc/hosts to see if different or gives you some clues to debug.

1 Like

Another cache flush + reboot seems to have solved the issue. Might just be something that got stuck at random.

Worked fine for the next one I added. So just a situational glitch. Thanks for the advice everybody!