How to block websites on Mac

In do:

sudo nano /etc/hosts

Add at the end of the file, replacing the domain mane with a domain name you wish to block. For example:

Save with control+o and exit with control+x

Last step it to flush your cache.

sudo dscacheutil -flushcache

I'm an industrial, product and experience designer from Helsinki, Finland. This website is my little corner of the internet. Subscribe if you'd like to receive emails from me when I add something new, and hopefully something worth your time here.