, 2 min read

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