How To Block Facebook / Any Website Without Using Software

If you want to block / restrict a particular website or multiple websites on your computer just follow the below steps. This trick will is useful to block any websites which are surfing by your children or anyone in your house or company computers.
You can also block the software from validating the product key or license information form the software website.

Now Let us see how to block a website. Example: www.facebook.com

Read: 2 Ways To Rename Multiple Files And Folders In Windows

How To Block Websites Without Any Software

  • Open My Computer and go to C:WindowsSystem32driversetc
    Find Hosts file
  • Open hosts file in notepad  (Double Click To Open)
  • Select Notepad in Open with Dialog.
Open Hosts file in notepad
  • Text in the hosts file look like in below image.
Hosts file
  • Below the  127.0.0.1              localhost 
  •                   ::1                        localhost
  •  Enter websites in below format
  •  127.0.0.1        www.SiteName.com
  • To block facebook website add the below line to hosts file
  •   127.0.0.1      www.facebook.com   
Add facebook.com to hosts file
  • To block multiple websites Add website one after one in a new line in the below format
  • 127.0.0.1     www.SiteName.com
  • See the below image.
Add multiple sites to hosts file
  •  Ctrl+s and save the hosts file. 
  • That’s it open any browser try to open the website which you blocked. It will show the Unable to connect message.
Unable to connect mozilla firefox
  • This works on all the browsers like Internet explorer, Firefox, Chrome, Opera, Safari,….etc

How To Unblock Website

  • Simply Remove the line which you have added in hosts file.

Read: How To Disable Startup Programs

    About krishna

    I am a tech lover. just wander around the net for the latest tech news. I like to share the intresting news to freinds.

    Comments

    1. this is not working

    2. In my system localhost is not there then how can I setup

    3. Thanks! Works pefectly. I am also a computer professinal, looking for this to stop me from accessing FB on PC & limit me to access only on Mobile to save my time. I have used my Xps viewer to take print of this page for future use only. Thanks again.

    4. WOW.. this is just great and very informative but I also want to tell everyone if Facebook is blocked then they can access blocked website by using this link.

      Unblock Facebook

    5. Anonymous says:

      If the kids are smart you can remove the www. as most sites allow you to access it without the www

    6. thanksssss….!!!!!!!!!

    7. You can also access any blocked site if you want. For that you just need to click on this link if you are willing to open any blocked site.
      Unblock all Sites

    8. good share……………the method describe here also works perfectly for me-http://www.superpctips.net/2012/05/how-to-block-website-in-windows-7.html

    9. Superb ! Your blog is incredible. I am delighted with it. Thanks for sharing with me.

    10. good one what if it says access is denied to host folder

    11. It’s Not Working Bro

    12. i am not able to make the save of the edidted file please any suggestion.

    13. its not working…actually the file ccant b save in the name of host….so wt shld i do….

    14. Anonymous says:

      you may copy paste the file on dekstop. then make the change. then save it on desktop. then cut it and paste and replace the original host file with this new one. it should work this way.

    15. Anonymous says:

      This is all well and good, until Facebook redirects the request to SSL and then it’s not blocked AND encrypted!

    16. it block in all place or just my computer

    17. Anonymous says:

      not working if https:// is used

    18. Anonymous says:

      This comment has been removed by a blog administrator.

    19. when i try to save..
      it says ..that i dont have the permission to do so..and asks if i want to save in another folder

    20. Anonymous says:

      hasn’t worked for me either, i wasnt able to save so i did as anonymous suggested – (you may copy paste the file on dekstop. then make the change. then save it on desktop. then cut it and paste and replace the original host file with this new one. it should work this way.)

      however, even though the file has successfully changed and has the line of text with facebook on it, i can still access the website as normal. any ideas?

    21. Anonymous says:

      hey, this is the above commenter, i spoke too soon. has worked fine! thanks (unfortunately i cant delete the above comment)

    22. Anonymous says:

      Since it was opened as a text file, it wants to save as a text file. Then it won’t let me access the folder.

    23. Awesome…. jus incredible bro…. ur trick has jus solved my huge obstacle… hats off dude…. kep goin.. ;)

    24. Bro i got a prblm to save the file. its asking that ask permission to administrator

    25. my window defender deleted it omg

    26. Anonymous says:

      in my system local hosts is not there please help me

    27. Sorry Boss it is not working .i don’t know where is the problem .

    28. it’s working bro..
      good job

    Speak Your Mind

    *