Tricks & Tips Tutorials

How to Block Access to Any Website in your Computer?

Hi Guys! Today I am back with one more trick, that is how to block access of a particular site in your computer using notepad and simple coding, this trick is tested is windows 7 and 8 and working perfect, you can block any website using this trick and also remove block when needed. Follow this trick with attention as it is very important, if you change any other thing, then your internet access will be affected.

We are going to work on administrator mode so each and every command is important, we are going to access host file of your computer and block a particular website access in it. So, follow my steps carefully!

How to Block Access to Any Website in your Computer

  • Goto to start and search for Notepad.
  • Locate notepad, now right click on it and run it as administrator.
  • Now, Open the host file by browsing Computer » C Drive » windows » system32 » drivers » etc » host.
  • Open the host file with notepad and scroll to bottom, you will find # ::1             localhost
  • Just Below that paste the following code
 # Blocking GoogleFacebook
  • Change Google Facebook URLs with other websites to block it in your computer.
  • Now save the host file.
Congo! Now you have blocked access to Facebook and Google in your computer, block more sites or other sites just by replacing the links. I hope you enjoyed this tutorial, If you like this article then share it with your friends and subscribe our newsletter to get more tutorials directly to your inbox.

About the author


Sasidharan is the owner of Techspotz and writes on various topics like How-to tutorials, SEO, Blogging etc. Loves tech in any form, quite optimistic about AI, Blockchain and IoT.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.