There are several questions about this, but none seem to address what I'm seeing.
After editing my /etc/hosts with vi with a test redirect, nothing is redirecting when I visit in a browser, including Safari, Chrome and Firefox. This is on MacOs Sierra.
## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost 127.0.0.1 www.cnn.com/ the result of $ cat /private/etc/hosts shows the same contents.
I have tried flushing the cache two ways:
$ sudo killall -HUP mDNSResponder $ dscacheutil -flushcache I have also rebooted my machine.
How can I get my /etc/hosts file to redirect?