How to manually block advertisements with /etc/hosts
Posted: Sat 14 Apr 2012, 06:00
How to manually block advertisements with /etc/hosts
Start a fresh Seamonkey (no cookies, empty cache).
Open only one web site.
Open in another tab : about:cache
You will see many entries : notice which entries are for advertisements.
They are easy to reckognize, it's usually something like ad*** advert*** ads*** track***...
Open /etc/hosts as text with geany.
Add the advertisements to be blocked.
For instance, add the lines :
0.0.0.0 ade.googlesyndication.com
0.0.0.0 adservice.google.com
0.0.0.0 www.googleadservices.com
0.0.0.0 www.google-analytics.com
0.0.0.0 www.googletagmanager.com
0.0.0.0 www.googletagservices.com
0.0.0.0 www.googletagmanager.com
0.0.0.0 pagead2.googlesyndication.com
0.0.0.0 ssl.google-analytics.com
0.0.0.0 platform.twitter.com
0.0.0.0 widgets.outbrain.com
0.0.0.0 c.amazon-adsystem.com
etc. etc.
There can be dozens of them.
Save.
Leave Seamonkey and reopen the example website. You will see it loading cleaner and faster.
Do this for each of your favorite websites.
Start a fresh Seamonkey (no cookies, empty cache).
Open only one web site.
Open in another tab : about:cache
You will see many entries : notice which entries are for advertisements.
They are easy to reckognize, it's usually something like ad*** advert*** ads*** track***...
Open /etc/hosts as text with geany.
Add the advertisements to be blocked.
For instance, add the lines :
0.0.0.0 ade.googlesyndication.com
0.0.0.0 adservice.google.com
0.0.0.0 www.googleadservices.com
0.0.0.0 www.google-analytics.com
0.0.0.0 www.googletagmanager.com
0.0.0.0 www.googletagservices.com
0.0.0.0 www.googletagmanager.com
0.0.0.0 pagead2.googlesyndication.com
0.0.0.0 ssl.google-analytics.com
0.0.0.0 platform.twitter.com
0.0.0.0 widgets.outbrain.com
0.0.0.0 c.amazon-adsystem.com
etc. etc.
There can be dozens of them.
Save.
Leave Seamonkey and reopen the example website. You will see it loading cleaner and faster.
Do this for each of your favorite websites.