Windows Host File


The hosts file was used to resolve host names for decades before the DNS system was implemented, since way back in the ARPANET days. Since they were used to aide in network name resolution, hosts files grew to become massive documents. So Host files are not used for that purpose. But they can be used to block web sites on a local PC. This is a short instruction on how to do that:


Using Notepad as administrator open the host file: \Windows\System32\Drivers\etc\hosts. (note: The file name is 'hosts' no extension) Next change what you want to change
Copyright (c) 1993-2009 Microsoft Corp.

The host name is the URL of a web site.
The IP address is where you want the web site to be redirected to.
Each entry should be kept on an individual line. The IP address should be placed in the first column followed by the corresponding host name.
The IP address and the host name should be separated by at least one space.
Additionally, comments may be inserted on individual lines or following the machine name denoted by a '#' symbol.

For example:

102.54.94.97    rhino.acme.com    #source server
38.25.63.10      x.acme.com          #client host

localhost name resolution is handled within DNS itself.
  ::1 = localhost
127.0.0.1 = localhost
Forwarding a site to 127.0.0.1 blocks the link.

I like to add the following to my host file to block some unwanted sites, but you can use it to block any site on the local computer:

Start of entries added by [your name]
127.0.0.1 207.com
127.0.0.1 a.ads.rmbl.ws
127.0.0.1 admarketplace.net
127.0.0.1 ads.creative-serving.com
127.0.0.1 ads.pubmatic.com
127.0.0.1 adthis.com
127.0.0.1 adzerk.com
127.0.0.1 allsearchapp.com
127.0.0.1 amazon-adsystem.com
127.0.0.1 analytics.yahoo.com
127.0.0.1 dolcettacademy.com
127.0.0.1 doubleclick.net
127.0.0.1 fastclick.com
127.0.0.1 fastclick.net
127.0.0.1 google-analytics.com
127.0.0.1 googleadservices.com
127.0.0.1 googletagmanager.com