4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by alaa sam
0

If you want to block specific sites you can edit the file

c:\windows\system32\drivers\etc\hosts

for each site that you want to block, add a line like the following

127.0.0.1 site-address

for example, if you wanted to block access to the site www.wired.com you would add

127.0.0.1 www.wired.com

Normally, if you entered http://www.wired.com into your browser address bar, a DNS (domain name server) would convert that address to an IP address (in this case, 216.246.75.107). What the new entry in HOSTS does is force the location to the address you specified (127.0.0.1) which, instead of being the actual site is now your localhost adapter.

Note - you will have to run your editor as Administrator. Also, once you are done, you can check the results by opening a command window and typing (substitute your blocked website address)

ping www.wired.com

you should see

Pinging www.wired.com [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time=1ms TTL=128

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.