The Hosts File on Android Against Obtrusive Advertisement

I don't mind some advertisement on websites as long as it's not obtrusive. Live and let live. On the desktop that line has long been crossed with major news websites looking more like a Las Vegas casinos than news websites. So I've been using Adblock Plus for many years there already and I'm always shocked when I switch it on and see how the unfiltered web 'really' looks like these days. On the mobile side, ads were somewhat more subtle on the web sites I frequent, at least until recently.

Within a short time, however, the three news websites I visit daily on my mobile have started to push ads into my face with full screen pop-ups or keep showing me the same stupid ad over and over again. Sorry, that's it, you've pushed me over the edge and I had to resort to countermeasures. Adblock Plus is available as well for Android but unless there is no alternative I don't want a proxy in the system.

The alternative is to make use of the 'hosts' file and block ad serving domain names. This requires root access to the device but that's not a problem on CyanogenMod. Also, I've already modified the hosts file to keep apps and the OS from frequently calling home so it was little effort to also include the domain names from which the ads come from.

Actually I'm a bit shocked at how many domains I had to block to get back my peace on three news websites. Here's the list of domains they include in their pages that have nothing to do with the main content:

#Ad blocking
127.0.0.1   ad8.adfarm1.adition.com
127.0.0.1   googleads.g.doubleclick.net
127.0.0.1   stats.g.doubleclick.net
127.0.0.1   mobile.smartadserver.com
127.0.0.1   www.google-analytics.com
127.0.0.1   pagead2.googlesyndication.com
127.0.0.1   ads.stickyadstv.com
127.0.0.1   pixel.rubiconproject.com
127.0.0.1   t1.visualrevenue.com
127.0.0.1   beacon.krxd.net
127.0.0.1   rtb.metrigo.com
127.0.0.1   c.metrigo.com
127.0.0.1   ad.zanox.com
127.0.0.1   cm.g.doubleclick.net
127.0.0.1   ib.adnxs.com
127.0.0.1   ih.adscale.de
127.0.0.1   ad.360yield.com
127.0.0.1   ssp-csynch.smartadserver.com
127.0.0.1   ad.yieldlab.net
127.0.0.1   dis.crieto.com
127.0.0.1   rtb.eanalyzer.de
127.0.0.1   connect.facebook.net
127.0.0.1   platform.twitter.com
127.0.0.1   b.scorecardresearch.com
127.0.0.1   sb.scorecardresearch.com
127.0.0.1   ads.newtentionassets.net
127.0.0.1   ak.sascdn.com
127.0.0.1   fastly.bench.cedexis.com
127.0.0.1   probes.cedexis.com
127.0.0.1   linkedin.com
127.0.0.1   x.ligatus.com
127.0.0.1   d.ligatus.com
127.0.0.1   a.visualrevenue.com
127.0.0.1   radar.cedexis.com
127.0.0.1   www.googletagservices.com
127.0.0.1   pubads.g.doubleclick.net
127.0.0.1   farm.plista.com
127.0.0.1   static.plista.com
127.0.0.1   video.plista.com
127.0.0.1   tag.yoc-adserver.com
127.0.0.1   ads.yahoo.com

Yes, that's from just three news portals. Quite shocking…

4 thoughts on “The Hosts File on Android Against Obtrusive Advertisement”

  1. I (and you as well ;)) forgot to mention that this might save some precious data volume as well!

  2. Hi Stefan,

    great, thanks for that info! Incredibly long list! I compared some of my
    domains I block and some are on that list while others are not.

    Kind regards,
    Martin

Comments are closed.