How to Block Facebook Using Host File

How To Block Facebook Using Hosts File

In this post, I will show you simple and quickest ways to block Facebook by using Hosts file.

Facebook is the most visited social networking site in the world with more than 400 Millions of users.

Based on some research, people log on to Facebook 4 times a day and spend at least 7 hours checking with friends news updates including checking pages with large number of Facebook likes, etc.

Some fears Facebook will reduce human productivity and may lead to addictive behavior.

If you are searching for the most simple ways to block Facebook, this post will absolutely helps you.

In this post, I will show you simple and quickest ways to block Facebook by using Hosts file. Enjoy!

Simple Steps to Block Facebook

1. Go to Start > Run or press Windows + R

2. Copy these string into Run fields.

Please copy the string based on your Operating System. You can refer below:

Windows XP, Vista, Windows 7, Windows 10 and  above
C:\WINDOWS\system32\drivers\etc\hosts

Windows 2000 
C:\WINNT\system32\drivers\etc\hosts

Windows 98/ME
C:\WINDOWS\hosts
How To Block Facebook Using Hosts File - Step 2

3. Click Enter and then open the hosts file using your preferred text editor. I used Notepad.

How To Block Facebook Using Hosts File - Step 3

4. Copy and Paste the following into the Hosts file after 127.0.0.1 localhost

# Block Facebook
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 www.static.ak.fbcdn.net
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.connect.facebook.com
127.0.0.1 www.static.ak.connect.facebook.com
How To Block Facebook Using Hosts File - Step 4

5. Save your Hosts file and your are done! You can try to open Facebook and if there is still no effect, restart your workstation and retry again.

Attention!: Please make a backup of your hosts file in case of anything happened


Cover image credit to telegraph.co.uk