15th October 2015

Suppressing Advertisement on Web-Pages a.k.a. Ad-Blocking

Advertisements on web-pages is ubiquitous. Without advertisement even this blog could not be offered free of charge. But advertisement can be a real nuisance with its blinking, flickering, moving, and distracting appearance. Sometimes they even contain malware.

There are two simple remedies for this problem:

  1. use an adblocker plug-in for your browser
  2. modify your /etc/hosts file

The first one is easy to accomplish, but sometimes web-pages no longer work as expected. The second approach is in some ways more direct and more brutal, and leaves visual clues on the web-pages that brute force has been applied.

Editing /etc/hosts on your Linux desktop is easy. On Android you connect via adb shell, switch to root user with su, then

mount -o remount,rw /system

i.e., remount the /system directory from read-only to write-enabled, then edit /etc/hosts. Either reboot your smartphone, or

mount -o remount,ro /system

I use the following list of hosts in my /etc/hosts, which has a somewhat German felling:

# Block annoying ads	akamai.smartadserver.com	at.atwola.com	adserv.quality-channel.de	s0.2mdn.net	adfarm1.adition.com	ad1.adfarm1.adition.com	ad2.adfarm1.adition.de	doubleclick.net	ad-emea.doubleclick.net	ad.doubleclick.net	ad.doubleclick.com	ad.de.doubleclick.net	googleads.g.doubleclick.net	pagead2.googlesyndication.com	tpc.googlesyndication.com	pubads.g.doubleclick.net	bid.g.doubleclick.net	2o7.net	metalyzer.com	static.2mdn.net	adserver.adtech.de	www.nuggad.net	nuggad.net	asv.nuggad.net	fxm.nuggad.net	oms.nuggad.net	tofo.nuggad.net	si.nuggad.net	cdn1.smartadserver.com	adimg.uimserv.net	rm.newtentionassets.net	ad.yieldmanager.com	euros4click.de	media.funpic.de	adfarm.mediaplex.com	img-cdn.mediaplex.com	im.banner.t-online.de	adclient.uimserv.net	ads.yimg.com	ds.serving-sys.com	mjxads.internet.com	adserver.freenet.de	view.binlayer.com	adsfac.eu	mi.adinterax.com	trafficrevenue.net	banners.contentfeed.net	de.partypoker.com	de.partycasino.com	ih.adscale.de	ads.heias.com	cdn.flashtalking.com	ad.amgdgt.com	eas4.emediate.eu	ad4.adfarm1.adition.com	farm.plista.com	ww251.smartadserver.com	ced.sascdn.com	track.adform.net	o1.qns.com	springer02.webtrekk.net	bild.ivwbox.de	ad.zanox.com	ad.ad-srv.net	www.adnxs.com	adnxs.com	ib.adnxs.com	lax1.ib.adnxs.com	tag.imaginaxs.com	ivwbox.de	outbrain.com	www.ligatus.com	ligatus.com	r.ligatus.com	yieldlab.net	www.scorecardresearch.com	scorecardresearch.com	krxd.net	a.adroll.com	d.adroll.com	s1.2mdn.net	addthis.com	adsrvr.org	ad.adsrvr.org	adap.tv	engine.adzerk.net	exalator.com	fastclick.com	triggit.com	tidaltv.com	simpli.fi	www.active-srv02.de	imagesrv.adition.com	c.betrad.com	batch.threadex.com	urban.adspirit.de	pub.adspirit.de	top.oewabox.at	a.visualrevenue.com	ads.yahoo.com	sponsorads.de	www.sponsorads.de	imgserv.sponsorads.de	1414.de	adgrx.com	adaos-ads.com	ad.360-yield.com	img.turn.com	streaming.ad-balancer.at	ipage.grm-pro.com	wa.kurier.at	pix04.revsci.net	hubtraffic.com	ss.phncdn.com	pt.trafficjunky.net	1digitalstock.com	static.1digitalstock.com	cdn.dreamrev.com	go.youlamedia.com	js.moatads.com	cdn1.ads.contentabc.com	cdn.movad.net	a.twiago.com	de.ioam.de	cdn.optimizely.com	inskin.hs.llnwd.net	cd.xplosion.de	p.flite.com	asset.flite.com	www.adcash.com	www.mgid.com	imgg.mgid.com	pixel.adsafeprotected.com	secure.flashtalking.com

Categories: web-browsing
Tags: ,
Author: Elmar Klausmeier