Changing hosts file to prevent appearance of contextual ads from Google AdSense and Chitika

Comments Off

Various advertising networks strictly prohibit publishers from clicking on contextual ads appearing on their own website. Multiple clicks and impression arising from a few IP address may lead to ban your account. Many publishers have been banned from Google AdSense program because of this. Accidental clicks result while you work on your website for eiditing and modifying and while viewing preview of edited version. Therefore it is very useful to protect yourself form accidental clicks. Changing the hosts file is one of the best ways which permanently remove appearance of contextual ads from chosen places (like Google, Chitika etc).

Typically a “hosts” file contains only one entry that is “127.0.0.1 localhost” (see picture below) . In simple layman language, a host can be any website and the hostname always points to a particular unique IP address. In above case localhost is hostname for your computer and it will point to IP 127.0.0.1. IP address and hostname in combination recognize the web presence of any website. AdSense and other contextual ads arise from a particular server (hostnames) which points to a particular IP. Every computer recognizes this unique IPs. If you assign your computer’s IP address (127.0.0.1) for each of hosts serving ads in your website then your computer will point to your IP (127.0.0.1). This will prevent retrieval of actual ads from AdSense, Chitika and other advertising network servers in your computer. Now next thing is how to change the “hosts” file. Just go to C:\WINDOWS\system32\drivers\etc. Now click on the file named “hosts” with notepad. Now you can add the “IP Address – Hostname” combinations to block ads from various contextual advertising services. Here IP address will always be “127.0.0.1” while hostname will vary depending on where from your ads appearing on your websites. First write IP “127.0.0.1” followed by “hostname” after giving 2 spaces. Add only one entry per line. This setting will permanently blocks AdSense, Chitika and other specified ads from appearing on your computer web browser. Therefore there is no questions of invalid clicks.

Hosts file

Hosts file

For your convenience, I have listed the recommended setting which you can add to your “hosts” file.

Set common IP ( 127.0.0.1) for all hosts.

  • Hostnames to serve Google ads

127.0.0.1  adwords.google.com #[Gmail ads]
127.0.0.1  pagead.googlesyndication.com
127.0.0.1  pagead2.googlesyndication.com #[Google AdWords]
127.0.0.1  syndicate.googlesyndication.com
127.0.0.1  syndicate2.googlesyndication.com
127.0.0.1  googlesyndication.com
127.0.0.1 adservices.google.com
127.0.0.1  syndicate.google.com
127.0.0.1  syndicate2.google.com
127.0.0.1  ssl.google-analytics.com
127.0.0.1  www.google-analytics.com #[Google Analytics]
127.0.0.1  google-analytics.com
127.0.0.1  imageads.googleadservices.com
127.0.0.1  imageads1.googleadservices.com
127.0.0.1  imageads2.googleadservices.com
127.0.0.1  imageads3.googleadservices.com
127.0.0.1  imageads4.googleadservices.com
127.0.0.1  imageads5.googleadservices.com
127.0.0.1  imageads6.googleadservices.com
127.0.0.1  imageads7.googleadservices.com
127.0.0.1  imageads8.googleadservices.com
127.0.0.1  imageads9.googleadservices.com
127.0.0.1  www.googleadservices.com

  • Hostnames to serve Chitika ads

127.0.0.1  ads.chitika.net #[IE-SpyAd]
127.0.0.1  ads1.chitika.net
127.0.0.1  blogads.chitika.net
127.0.0.1  ca.chitika.net
127.0.0.1  mm.chitika.net
127.0.0.1  scripts.chitika.net

Both comments and pings are currently closed.

Comments are closed.