Block Facebook

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.

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:

  • Each one of those entries must be on it’s own line. Save the file when it’s finished editing
  • Now you need to flush the DNS cache for changes to take effect, type the following command in the Terminal:
dscacheutil -flushcache
  • Try to access facebook and it should no longer work

If you remove the entires from the /etc/hosts file you will be able to access Facebook again as usual.

How to block Facebook with the Hosts file in Windows:

This works for Windows XP, Windows Vista, and Windows 7.

  • Locate your Windows hosts file, at C:WINDOWSsystem32driversetchosts
  • Open this file in your favorite text editor, Notepad works fine
  • Add the following lines to the hosts 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.

Tagged with: , , ,
Posted in Internet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this site and receive notifications of new posts by email.

Join 197 other subscribers
wordpress com stats plugin
%d bloggers like this: