How to Block Websites on a Mac
Wondering how to block websites on a Mac? Well, read right ahead to know about the various options regarding how to go about it.

Novice Users: people who are afraid that simply pressing a key might break their computer.
Intermediate Users: people who don't know how to fix their computer after they've just pressed a key that broke it.
Expert Users: people who break other people's computers.
~ The Jargon File
If we look around us today, we'll see more people belonging to the third category than in any of the other two! Add Internet to the phenomenon of computer operation expertise and you have a force that can take you places! There are two sides to every coin and Internet is no exception. As much as moderation is the key to happiness and success in the real world, it is equally true in the virtual world as well. Nowadays, it is not an unusual sight to find kids sticking their noses into the computer screen, attacking the keyboard with all their juvenile fury, spending more time on the Internet than with their parents or siblings. This coupled with a growing trend of Internet addiction in adults and teenagers, a lot of people can be found inquiring about ways to block various websites on different web browsers that pose distractions in the normal course of personal, professional and social life. In this article, I'll be giving you tips on how to block websites on a Mac.
How to Block a Website on Mac
There are two ways in which you can block access to websites on a Mac on the OS level itself. You can either exercise the Parental Controls option on your Mac OS or you can block any (un)desired by manipulating the HOSTS file. Let's take a look at how to go about blocking websites on a Mac using each of these two options.
Blocking Through Parental Controls Option
Here's how you can block distracting and detrimental sites in a Mac from the OS level itself. This option, however, has a limited scope as you can only place very specific restrictions as provided under the Safari browser. Anyway, here's how you go about it:-
- Click on and open System Preferences;
- There, you'll find the Parental Controls option. Click on it;
- In case there are more than one user accounts on your system, you will have to specify for which user account you wish to enable the restriction for. You can also create a password protected block;
- Once you've performed the above mentioned actions, click on Enable Parental Controls;
- A menu will open up which will ask you to set the control parameters for the web browser and other relevant programs that you use on your Mac;
- Next, click on the Content tab and select amongst the restriction options provided under the Safari browser;
- You can either select which types of websites to block from the options provided by Safari or you can create a list of websites to which you wish to have access. In the latter case, you need to select the option Allow Access To Only These Websites and create a list of the sites that you want access to.
Blocking Through HOSTS File
If you're wondering how to block access to a website on any Mac Internet browser, then this is the way to go.
- First of all, the OS installed in your Mac must be a Mac OS X;
- Launch the Terminal application by going to the Applications folder which can be found on your hard drive;
- Open the Utilities folder within the Applications folder;
- There you'll find the Terminal application. Just double-click on its icon to run it;
- Make a backup of the HOSTS file and type sudo/bin/cp/etc/hosts/etc/hosts-original in the Terminal pane;
- Hit ENTER when you've done so;
- You will be asked for the password which you must give, being careful to type it correctly;
- Once this has been done, type sudo/Applications/TextEdit.app/Contents/MacOS/TextEdit/etc/hosts in the Terminal;
- This will cause the HOSTS file to open in TextEdit;
- Once all the automatic localhost lines have appeared, type in 127.0.0.1 abc.com and 127.0.0.1 www.abc.com, abc being the name of the site that you want to block;
- You can block multiple sites this way by just adding the names/ URLs of the specific sites in the fashion mentioned above;
- Exit TextEdit and save the HOSTS when the system gives you the prompt;
- Run the dscacheutil -flushcache command in the Terminal to activate the new HOSTS file and flush the DNS.
There is another way you can go about answering how to block websites on a Mac - download and install the SelfControl application. This application is compatible for OS X 10.5 and later OS X versions. This application effectively blocks any website or mail server (both incoming and outgoing) for a specific period of time. This process cannot be undone by any action, not even by restarting your computer. The only way to regain access to the blocked sites is to wait out the timer! In a way, this method is better than the OS level blocks and the password protected blocks as when you yourself have the key to unlock, then it hardly makes sense if it's for your own sake that you are putting up the barricades!
Like This Article?
Follow:

Post Comment | View Comments


