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 “127.0.0.1 (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 “127.0.0.1 localhost”.
4. Under “127.0.0.1localhost” just add another website URL that you want to block. Example 127.0.0.1localhost 127.0.0.2 www.amazon.com 127.0.0.3 www.facebook.com
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.
8 thoughts on “HOW TO MANUALLY BLOCK A WEBSITE FROM YOUR PC”
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?
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.
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
Line Number 392, Column 33: &netOffline.longDesc;
Thank you for your help
Nice for stopping by. i’m glad to know that it worked for you. i never had such problems on my blocked sites. is your firefox the latest version?
Pls, I can’t find ‘host’ in my own ‘etc’, it is just empty so I couldn’t continue.
Then try using your system without the notepad
this is how i added,
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
# 127.0.0.2 http://www.amazon.com
but after saving, i’m able to open amazon!!!,,,how to block it?
It is not working for you because you did not perform the trick as you should. Try to follow what i laid down with my steps