I need to block a particular website on my Mac (OSX 10.11.1, El Capitan).
I have already made the changes to /etc/hosts but the website is still not blocked when testing from Chrome. I think this has to do with it being an HTTPS connection.
sudo nano /etc/hosts, I have modified the /etc/hosts file to add the following lines:
I checked the changes with
cat /etc/hosts. Then I flushed the DNS cache using
sudo killall -HUP mDNSResponder and
sudo dscacheutil -flushcache.
I then try to access the page from within Chrome and it succeeds. I have also rebooted the machine, but the connection still succeeds.
It seems that this should work. I have searched extensively, and this approach is the most recommended. What am I missing?