How To Block Facebook using Hostfile

17 February 2013

How To Block Facebook using Hostfile

Posted by Sachin Yadav

How To Block Facebook

If you wanna block Facebook then modify the host file is vary easy and cool tricks.Because block fb using software is little frustrating .

in window and other operating system use there mini-name server for themselves so that they check their own dns record(domain name server is like converting the domain name (example : Google) into there respected ip address)before asking a name server on the internet.


What is Hosts file


  • The hosts file is a simple list of host names and their corresponding IP addresses
  • your computer looks at every time you try and contact a previously unknown host name
  • If it finds an entry for the computer you're trying to reach, it sets the IP address for that computer to be whatever in the hosts file.

Also Check: Important Shortcut key

Location of host file is same in every version of microsoft XP,vista,7,8


How To Block Facebook

In Window 8 :You have to open notepad with administrator


How To Block Facebook



Now open the host file location in notepad

How To Block Facebook

Now write the website name after 127.0.0.1 example www.facebook.com


How To Block Facebook

Save this and Restart your system


For Unblock the website from your host then simply delete all the website which are listed after this 127.0.0.1 and save the file and restart your system.Same procedure is repeat in window 7 and xpTry it yourself and tell me about your experience using comment.Question are most welcome every time