How To Block Facebook 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

Windows 2000 

Windows 98/ME

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

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

# Block Facebook

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