How to Block Facebook

Facebook is a great way to stay connected to people and has plenty of benefits, but that’s not why we’re here, we’re here to block access to Facebook. Why? Well, there are many reasons to block the site, companies often block the site to prevent employees from accessing it on company time, and parents may want to block Facebook to keep their young children away from some of the more mature content.

Then there are people like me, you like the site but you find Facebook to be an enormous distraction when trying to be productive. Sometimes the easiest way to eliminate the distraction is by forcibly blocking a site along with others that are blackholes of time. I actually have Facebook and a handful of other sites permanently blocked on my work machine, it has kept me free from distractions and I’m sure it helps my productivity. Without further ado, let’s find out five different ways to block Facebook.

5 Ways to Block Facebook

You’ve decided you want to block Facebook, we’ll cover various ways to achieve this. This will include specific methods for Mac and Windows, and also ways to block Facebook from an entire network using a router or custom DNS. Before you ask, yes these methods work for blocking other websites and domains as well.

Block Facebook system-wide using the Hosts file

By editing the hosts file, you will block Facebook (or other specified websites) from all applications on that computer. This is actually the method I use when I’m trying to block a website because it’s so easily reversible and it’s system-wide.

How to block Facebook with the Hosts file in Mac OS X:
This works in all versions of Mac OS X.

Launch the Terminal, located in /Applications/Utilities/

At the command line, type: sudo open /etc/hosts

Enter your administrative password when asked

TextEdit will now launch with /etc/hosts open, you need to add the following lines to the bottom of the file

Reboot your Windows PC and try to access Facebook, it should be blocked

You can then unblock Facebook by simply removing the entries from the hosts file.

Blocking Facebook with Internet Explorer

If you’re trying to block Facebook from a PC and the primary browser is Internet Explorer, you can add it to a built-in block list:

Open Internet Explorer and click on the ‘Tools’ menu

Click ‘Internet Options’

Click on the ‘Content’ tab

Click the ‘Enable’ button

Click on the ‘Approved Sites’ tab

Type www.facebook.com in the box

Click ‘Never’ and then click ‘OK’

You’ll be asked to enter and confirm a password, do this and don’t forget the password

Now click on the ‘General’ tab and select ‘Users can see websites that have no ratings’

Click OK

You can do the same type of browser blocking with Safari, Chrome, and Firefox, but this is really the worst method since you can get around it so easily by just using another browser.

Temporarily blocking Facebook and other sites with SelfControl

If some of this is overkill to you, another solution for Mac users is to use an app called SelfControl which blocks distracting websites on your machine for a set amount of time. It includes a fully customizable blacklist so you can add and remove any site that is wasting your time quite easily.

Blocking Facebook from being accessed by an entire network

Perhaps you’re an office or school and you want to prevent your employees and students from accessing Facebook from your network. I know of several companies that do this for security reasons, and others block sites that they feel are not related to the task you should be performing. The easiest way to block sites is at the router, firewall, or DNS level. The other advantage to this method is that it should prevent someone from accessing Facebook from even an iPhone or Android phone, assuming it is connected through the wireless network.

Blocking Facebook on the Router

If you want to have a network-wide block of Facebook, all you need to do is add it to the block list on your router. I’ve seen this done countless times at offices, coffee shops, libraries, schools, and it’s one of the easiest ways to block everyone from accessing the site. The ability to block sites is usually labeled something along the lines of “Internet Access Policy” or “Domain Management” so you’ll have to look around in your router settings for the option. After you find it, it’s just a matter of adding the domains and saving the changes to the router, which will effect all machines that connect to the internet from that access point.

Block Facebook with OpenDNS

Using OpenDNS you can block Facebook or any other domains by adding them to a custom block list. Here’s the process for OpenDNS:

Add a network to your OpenDNS account via the account Dashboard

Navigate to “Settings” and select the network you want to block the site on

Select “Manage Individual Domains”

Select “Always Block” and then type in the domain you want to block (in this example, facebook.com)

This will effect all computers that are using the OpenDNS account to access the internet, if you have this set on a router, it will effect all the machines that connect to that router. Changes to OpenDNS are generally pretty quick, but it may take up to 15 minutes. You’ll also need to flush the DNS cache or reboot each machine that connects to the network for the changes to take effect, for this reason it might be a good change to make after work/school hours when network machines are shutdown anyway.

What about unblocking Facebook?

Of course there’s two sides to every coin, so what if you’re on a machine with Facebook blocked? If the site is blocked at the router or DNS level, you are out of luck without knowing the login information for those, or you’ll have to use a proxy service. If you suspect the block is on a PC-level, you can simply go through the directions above to see if Facebook has been blocked using any of those methods. For example, if you see the domain included in the hosts file, you can just remove it from the hosts file and you will be able to unblock the site and access it again.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

facebook, myspace, and related domains are all blocked at the uni libraries here, I think it forces people to study. There is a funny sign that says like “If you want to horse around on the web, do it from your dorm.”

Rebooting the windows PC is not required to update local DNS; simply open a command prompt and type “ipconfig /flushdns”. You’ll get a “Successfully flushed the DNS Resolver cache” message and you should be good to go.”

I’m running OS 10.9 and it says I don’t have permission to change the hosts file. When I try to change the permissions, it says I can’t do that for that file. Is this a new security feature? Whatever it is, it renders these instructions useless. :(

You can never actually totally block someone from signing into facebook I have used all these methods and more.
And if they use Windows Live or Yahoo or Ebuddy, or 15 other web based apps that sign them into facebook.
They can find a way to get into the piece of junk.
Basically shutting off the internet is the only way to completely block access to facebook, which is sad of course.

What i do not understood is actually how you are no longer actually a lot more well-appreciated than you might be right now. You are so intelligent. You recognize therefore significantly on the subject of this matter, produced me in my opinion consider it from so many numerous angles. Its like women and men aren’t interested except it is one thing to do with Woman gaga! Your own stuffs nice. All the time take care of it up!

Here’s a revolutionary idea: instead of jumping through increasingly obnoxious hoops to try and block your kids from accessing Facebook, how about educating them about things like that instead? If you prevent 12 year olds from accessing Facebook, then they won’t know how to deal with things like online threats to privacy by the time you feel they are old enough to deal with Facebook. And when they reached that age, they probably have a lot more privacy sensitive things to share than when they’re 12.