Skip to content


Some of us don’t want our kids watching adult movies and some don’t want their kids clicking their blog ad to prevent ban. Most people have other reasons of blocking some certain sites from showing in their pc.

So on today, we are going to know how to block sites from our pc manually without stress. Note that if you block any site it can’t be opened by any browser except you reverse it and remember that this tutorial is very simple to comprehend.

For this trick to work we are going to edit the host file of our windows and we will use the Ip address “ (i.e localhost)”.Whenever somebody tries to open the blocked website the user will be redirected to localhost.

1. If you’re running vista or windows 7, open your notepad as admin

2. Now click “file” and press “open” then go to C: \Windows\System32\Drivers\Etc and locate the file “hosts”.

3. When this hosts file is opened in Notepad, at the end of the file you will see something like “ localhost”.

4. Under “” just add another website URL that you want to block. Example

Now try to visit the site you just added with your browser and watch what happens.

Tip: Remember that you can always disable it by deleting the site you input.

You can drop your comment at the comment box below. Your comments are much appreciated and welcome.

If this post is of help to you, kindly click the like button and recommend use to friends. Don’t forget to subscribe to our feed.


  1. Hi,
    I like your tips, well done keep the good work.
    now, I have activated windows 8 using your way and when I try to modify localhost it gives me an error message:
    “Please check if this file is opened in another program.”

    Would you know why? and how to fix it?


    1. Hello Johann,
      Thanks for the complement. If you’re trying to open your host file, you’ll need to open it using admin privilege and i assure you that it will work. so do give it a try and let me know how it goes.

  2. Thank you very much, it works well.
    I did try to bare a website using hosts and it works but is there a way to redirect it to a different website instead of the error message below?:
    “XML Parsing Error: undefined entity
    Location: jar:jar:file:///C:/Users/Johann/AppData/Roaming/Mozilla/Firefox/Profiles/2o7yigt0.default/extensions/!/chrome/speedtest.jar!/content/netError.xhtml
    Line Number 392, Column 33: &netOffline.longDesc;

    Thank you for your help

Leave a Reply

Your email address will not be published. Required fields are marked *