Howto Block Unwanted Content From the Net in XP/2000
If you're new here, you may want to subscribe to Windows Reference RSS feed Thanks for visiting!
What we will do is to put a 127.0.0.1 for each site you wanna block like common ad servers and spysites .. When request to this site is found Windows will search for their entry in the Hosts file and it will found this (127.0.0.1) address and it will try to connect this site which is your Localhost address .. So it wont find the ad images and ad popups and the like .. Your computer will then give up calling the ad server and no ads will be loaded, nor will any tracking take place. Your choices for blocking sites are not just limited to blocking ad servers. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.
This HOSTS file is located here:
Windows 95/98/Me c:\windows\
Windows XP c:\windows\system32\drivers\etc\
Windows NT/2000/ c:\winnt\system32\drivers\etc\
This Hosts file doesnt have any extension .. You may find Hosts.sam in Win 98 but it is only a dummy file … You should save the Hosts file corresponding to ur Operating System …
So a small example Hosts file :
# localhost: Needs to stay like this to work
127.0.0.1 localhost
127.0.0.1 123banners.com
127.0.0.1 ad.adsmart.net
127.0.0.1 ad.ca.doubleclick.net
127.0.0.1 ad.de.doubleclick.net
127.0.0.1 ad.doubleclick.net
127.0.0.1 ad.es.doubleclick.net
127.0.0.1 ad.fr.doubleclick.net
127.0.0.1 ad.free6.com
127.0.0.1 ad.it.doubleclick.net
127.0.0.1 ad.iwin.com
127.0.0.1 ad.jp.doubleclick.net
127.0.0.1 ad.kr.doubleclick.net
127.0.0.1 ad.linkexchange.com
127.0.0.1 ad.linksynergy.com
# and so on …
The # sign denotes a comment ..
Random Posts
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.
Trackbacks & Pingbacks
Comments
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>






Want to know any trick of blocking content
like – Porn
i mean to say like host file is there any file in windows to block site by words only.
good job! ive used this to block certain sites that very disturbing…. really save my time…. even though i think it’s a very dangerous thing to do by average people… copy the real file first as precaution…
kool