How to block unwanted sites from opening? How do you block websites on Safari?
You can add an entry to your /etc/hosts file. For each site you want to block, add a line at the bottom, in the form:

127.0.0.1 site-to-block.com