How to Block Websites in Safari on Mac OS X Yosemite: 3 Methods Explained

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

Sponsored Links

How to Block Websites on Safari on 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/hosts and press Enter. Pressing enter, you will be asked to enter the Administrator Password

sudo pico etc hosts command in Mac

Sponsored Links

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 followed by the URL or Site address. i.e: 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.

Block Websites on Safari Running Mac OS X Yosemite

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.

Sponsored Links

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.

How to Unblock URLs or Websites you Have Blocked:

Launch Terminal → type sudo pico /etc/hosts → remove the URL and Site → press Ctrl+O and Enter

Sponsored Links

How to Block Website/URL on Mac with Parental Controls:

Step #1. First of all make a separate User Account for your children.

Step #2. Then go to System Preferences on your Mac.

System Prefences in Mac OS X Yosemite

Sponsored Links

Step #3. Click on Parental Controls.

Locate Parental Controls on Mac OS X Yosemite

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.

Block Website on Mac OS X Yosemite using Parental Lock

Step #9. Click on Customize…

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

How to Block Website on Mac OS X Yosemite with Parental Controls

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

Self Control Mac AppThere 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.

Price: Free
Download SelfControl

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


  1. 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.

  2. 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??

  3. 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.

    • 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?

  4. 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.


Please enter your comment!
Please enter your name here

Latest Articles

Apple Watch Series 4 and iPhone Xs Max Giveaway: iGeeksBlog 6th Anniversary Special

An anniversary is a time to celebrate the joys of today, the memories of yesterday, and the hopes of tomorrow.Yes, we are celebrating iGeeksBlog's...

11 Paid iPad and iPhone Apps Gone Free Today – 18 October 2018

iOS Games Gone Free TodayiOS Apps Gone Free TodayWhile there are tons of awesome apps available for free, a number of extraordinary ones come...

21 iPad and iPhone Apps Price Drop – 18 October 2018

What happens when you come to know that one of your favorite iPhone/iPad apps price has just dropped-and available at a huge discount? A...

Facebook Data Hack: 22% of Apple Employees To Delete FB Accounts

Recently, millions of Facebook users have been affected by the data breach, and following this, Apple employees are planning to delete their Facebook accounts,...