How to block a website (Windows Xp)

There are many reasons why you need to block a website.

* Spammers
* Spyware
* Porn etc...

Follow to steps to block a website:

Click Start --> All Programs --> Accessories --> Command Prompt

Type "notepad C:/Windows/System32/drivers/etc/hosts" (without quotes)

Now notepad will be opened.

To block the website example google.com, Add the following text under 127.0.0.1 localhost:

127.0.0.1 google.com
127.0.0.1 www.google.com

Save the file. That's it !

Now how to unblock a website

Click Start --> All Programs --> Accessories --> Command Prompt

Type "notepad C:/Windows/System32/drivers/etc/hosts" (without quotes)

Now notepad will be opened search the lines: example

127.0.0.1 google.com
127.0.0.1 www.google.com

and deleted it. That's it !

You can add as many sites, However you will need to prefix it with "127.0.0.1"

Note: You can block a website from your browser also but this is an advanced method not many will be knowing it :)
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Related Posts

9 comments: on "How to block a website (Windows Xp)"

Shantharam Shenoy K said...

hey gr8 post...informative...will definitely try...

and the previous post.. well did it to my cousin...should have watched his face...if i had not told him..he would have formatted for sure...

Vinayak said...

gr8 post
nice tip
thanx for telling..

Tarun said...

ya gud info i no this .....dude

evn this site do the same...
http://www.mvps.org/winhelp2002/hosts.htm

Chris said...

Doesn't work on Vista. Says the path is invalid.

Dan* said...

oh ya forgot to mention it works only in xp

EverybodyGeek said...

It does work in Vista. But you need to run notepad as administrator to be able to modify the hosts file.

7 Ways To Make Money said...

Thanks for the security tips that I always look for. I am going to try it!

Post a Comment