Matthew Steven Kelly

Google Chrome Hosts File

February2

At this moment in life I am using Google Chrome as my browser of choice.

It is fast, efficient, and has some interesting features and functionality that makes it easy for me to use (I am a big fan of the startup page, as well as how it organizes bookmarks, etc). However, I just noticed that it does seem to use my hosts file. For those of you who don’t know, a hosts file is a file that allows you to configure certain websites to redirect to certain other sites. For a home user, a big use is to block certain websites from displaying or accessing your computer…. Such as Google Analytics.

Let’s say I wanted to keep google analytics from tracking when I go to my own website. This is a very useful feature when you do not want the pages you view on your own site to show up on your google analytics page. This skews the ratings, generally towards direct referral traffic.

The way it works in Internet Explorer, Firefox, Safari, etc is… in Windows XP simply open: C:\WINDOWS\system32\drivers\etc\hosts

In notepad and add:

# [Google Inc]
127.0.0.1 www.google-analytics.com

to the file.

Is this a feature intentionally left out of Google Chrome to prevent users from blocking Google advertising like Google Adwords, etc? You can do it like this:

# [Google Inc]
127.0.0.1 pagead.googlesyndication.com
127.0.0.1 pagead2.googlesyndication.com #[Google AdWords]
127.0.0.1 adservices.google.com
127.0.0.1 ssl.google-analytics.com #[urchinTracker]
127.0.0.1 www.google-analytics.com #[Google Analytics]
127.0.0.1 imageads.googleadservices.com #[Ewido.TrackingCookie.Googleadservices]
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
posted under Technology and Me
«
»


  1. On February 2nd, 2009 at 8:26 pm Google Says:

    It’s a conspiracy!

    http://www.codeandcoffee.com/2008/11/03/google-chrome-does-not-use-your-host-file/

  2. On December 8th, 2009 at 1:17 pm va ver gallina cruda Says:

    To block others ads, see:

    http://www.taringa.net/posts/ebooks-tutoriales/3823597/Bloquear-publicidad-del-live-messenger,-yahoo,-taringa_.html