If you want to prevent your children from using any particular websites or your employee to be away from unnecessary websites, URL or Apps then there are some ways through which you can prevent them from using the web or app. To do so, you can configure Safari, set Parental Lock or there are some apps available for blocking websites. We have explained all three methods (block on Safari, Parental Lock and Lock through app) to block website on safari.

How to Block Websites in Safari Running Mac OS X Yosemite

Step #1. Launch the Terminal (Open Spotlight and search for the Terminal).

Step #2. In the Terminal type sudo pico /etc/hostsand presses Enter. Pressing enter, you will be asked to enter the Administrator Password

Step #3. Once you enter Password, the Terminal text program will open on the host file. Scroll the cursor down to the bottom and press Enter. It will create a new line to type.

Step #4. Type the IP 127.0.0.1 followed by the URL or Site address. i.e: 127.0.0.1 www.yahoo.com. And press Enter. Type another URL or Site following the same steps. Do not add more than one URL or Site in a single line, each entry should be in a separate line.

Step #5. Once you are done with the entry (the sites or URL, you want to block), press Ctrl+O and then Enter to save them and exit the editor.

Step #6. Then Flush your cache in order to take effect to the settings, type sudo dscacheutil -flushcache to flush your DNS and press Enter.

Now open the URLs or Sites you have blocked. If it is set up correctly you should not be able to open website/URL.

Step #4. Then click on the lock icon (shown at the bottom of the window.)

Step #5. Clicking on the lock icon, you will be asked to enter password. Click to unlock.

Step #6. Then select the User account that you want to lock.

Step #7. Select Web tab.

Step #8. Then select Try to limit adult websites automatically.

Step #9. Click on Customize…

Step #10. Under Never allow these websites, click on “+” icon and enter URLs/websites that you want to block.

After adding the websites or URL you can be sure that it cannot be accessed by the banned user.

Block Website on Mac OS X Yosemite Through App

There is an app, called Self Control, an open source application for Mac OS X. Through the app you can block the websites, URL, mail, and so on. The best thing about the app is when you block the sites/mail/URL, you cannot access the blocked sites unless and until the date you have added gets expired.

To Block, set a period of time and add sites to the blacklist and click Start. Once you click on start,it will be blocked for the period of time you have set. Until the timer expires, you cannot access those sites even if you delete the app.

Dhvanesh Adhiya is our editor-in-chief and reviewer who takes care of iGeeksBlog.com. He is passionate for wonderful apps that change the way your iPhone interacts in your life.

Larry.B0y

I’ve tried the “terminal” approach multiple times in various patterns, but all to no avail. Guess blocking sites is not meant to be on Safari. Google Chrome is a dream for blocking, so I’d wipe Safari off all Apple computers, but they won’t allow it. We’re stuck with a browser that only gives you Parental Controls as a viable option — that required a trip to the Apple store to resolve a multitude of MacBook issues after installing. So we’re back to sites getting through we don’t want on our family/laptop devices. Help us Apple …you sure aren’t making it easy to protect from junk coming across our screens.

Fábio Gelbcke

try without the www. in front, just the domain name.

Alex

You forgot to mention the Control+X command in Terminal (or some way to safely exit it when finished).

Adam B.

Option 1 sucks because: Who is going to want to crap around in Terminal every time they want to block a site?

Option 2 sucks because: No one wants to create parental control and different accounts on their Mac to block sites from themselves, and if you want to block sites from your kids, you’re waiting your time they’ll find that content some other way.

Option 3 sucks because: SelfControl is a stupid app that only blocks sites for 1 day at max.

There needs to be a way to manually block sites at their root (for example: “popup”) that doesn’t involve a crash course in writing code. Ad-Blocker and ABP fail in this regard. I guess it’s just too ordinary a need, the ability to (for example) right-mouse click and never have that site come up again. They can make an app to remind you to wipe your ass but not this, nooooooo too convenient I guess.

Fábio Gelbcke

I don’t block sites all that often so I do use option 1, although I don’t use pico, I use emacs. Who uses pico anyway?

Theresse

As a parent of a 12 year-old (who’s infamous for staying up late on the laptop – doing homework he didn’t get done earlier – then being found fast asleep at 1:00 a.m. with homework NOT done, and overheating laptop running with some dumb and inappropriate cartoon playing!!!) THIS is the best thing I’ve read since FOREVER! :) :) :) Thank you!

One question though: the laptop he has is a very old MacBook Pro. Probably about…8 years old. Do we have to have the latest software in order to be able to use these uber cool parental controls??

chelog

I use the method described with the terminal. Is effective but keeps on loading a blank page on safari. Can that be avoided too? Im trying to get rid of an annoyance that keeps connecting every click I made over a link that opens another one randomly. A kind of unwanted advertising. Thanks in advance.