It’s ironic that we’re posting this in a way, because a lot of you will be referred to this article via our Facebook page! Either way, here’s a little piece of useful information you may want to keep up your sleeve should you be in a situation where you need to call on it.
Regardless if you’re a web developer, or simply an end user, it is incredibly simple to block a website on your computer. We figured we’d focus on Facebook. Why? Well, although the guys and girls at Ziller love a bit of short-lived attention on the world’s largest social network (like every other human being!), it can prove to be extremely counter-productive when trying to get things done.
It’s a problem faced by many employers. Productivity is lost because staff are addicted to social networking. Anyway, if you would like to know how to block Facebook at work, or at home, here’s how it’s done:
Blocking Facebook on Windows OS
I’m going to take a stab in the dark and say that about 90% of workplaces use PCs over Macs, therefore knowing how to block a website on PC could prove to be extremely useful knowledge. Let’s run through it step by step:
- For this example, we will block the site using the hosts file. All hosts files are located deep within your operating system, but they’re easy enough to find. Go to ‘my computer’ and in your C:\ drive, navigate to the following path:
C:\WINDOWS\system32\drivers\etc\hosts (Windows7, XP and Vista)
C:\WINNT\system32\drivers\etc\hosts (Windows 2000)
The file named ‘hosts’ is the file that you want to edit. Before you open the file, however, it is suggested that you drag and drop a backup copy to your desktop.
- Open up the hosts file with ‘notepad’. Simply right-click and ‘open with…’
- Add the following line to the hosts file (do not delete anything already existing):
127.0.0.1 www.facebook.com
- Ctrl + S to save, and you’re done! If you try and access the site now, you’ll hit a 404 page.
Blocking Facebook on Mac
I run on a Mac at home, and having personally grown up using a PC, I initially had no idea how to go about blocking a website. This method is slightly trickier than Windows, because you have to use command line, but it’s still relatively simple!
- On the desktop screen, click the ‘Go’ option and navigate to ‘Utilities’.
- Open up ‘Terminal’.
- You’ll be greeted with the following – basically, the name of your computer, and your username.
- In the first line, type the following then hit ‘enter’:
sudo pico /etc/hosts
Note that command line is case sensitive, including spaces.
Once you hit enter, you will be asked to enter a password. This is the password for your Mac that you use to verify installations of programs on your computer.
- You’re in! Similarly to PC, simply enter the localhost IP address and the name of the site you want to block like the following example:

Save and exit by hitting Ctrl + X (not Cmd). When asked if you want to save changes, type ‘y’ for yes. All done! Facebook should be blocked on your Mac.
And there you go! The primary object of your procrastination is gone!