Getting rid of annoying ads in web pages.

  Batch 11:25 27 Oct 08
Locked

I get so fed up with annoying ads (including the incredibly irritating "mouseover" pop-ups) that I've tried to eradicate a number of them. I don't like them for two main reasons. Firstly, they can be downright irritating (especially the animated ones). Secondly they are a performance drain, both with regard to download bandwidth and CPU cycles. I find the CPU cycles a real issue as I often have multiple web pages open at the same time and each often has multiple animated ads. DON'T underestimate how much this can hit your CPU!

So what have I done about it. The answer lies in the hosts file (typically at: "C:\WINDOWS\system32\drivers\etc" or its equivalent). This file is used to look up domain names before using the normal domain name services. Thus one can force the lookup of the ad servers that are used in the web pages to be redirected to some other server. Normally you specify the IP address used in the result of the look-up to be 127.0.0.1 which is known as "loopback" and means that you are looking at your own machine. When a lookup is done for say adfarm.mediaplex.com, it looks for that domain on your machine, fails to find it and just moves on - problem solved.

To edit the hosts file, just use Notepad (close all your browser windows first). You may like to make a backup copy first.

Lines within hosts that start with # are just comments.

If you have a basic hosts file, it may well just have one active line:

127.0.0.1 localhost

If you use SpyBot S&D (and maybe some other software), you'll already find masses of entries in the hosts file. Don't worry, you can add your own entries in as well.

You can add whatever you like in. I have added (so far):

# Start of entries added by Batch
127.0.0.1 spe.atdmt.com
127.0.0.1 ads.bloomberg.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 ad.uk.doubleclick.net
127.0.0.1 ad.zanox.com
127.0.0.1 adserver.adtech.de
127.0.0.1 socratos.forrestersurveys.com
127.0.0.1 ads.contextual.ad-flow.com
127.0.0.1 ll.atdmt.com
127.0.0.1 m1.2mdn.net
127.0.0.1 ads.newsquest.co.uk
127.0.0.1 utarget.co.uk
127.0.0.1 wp.korelab.com
127.0.0.1 balloon.korelab.com
127.0.0.1 ads.telegraph.co.uk
127.0.0.1 one.utarget.co.uk
127.0.0.1 adfarm.mediaplex.com
127.0.0.1 pcadvisor.uk.intellitxt.com
127.0.0.1 honestjohn.uk.intellitxt.com
# End of entries added by Batch

All of the above active entries, except for the last two, simply block ad servers that I've come across on sites that I frequently visit. You'll often find the same ad servers are used on a variety of sites.

The last two entries are different. intellitxt is a service that enables those irritating pop-up ads that appear when you move your mouse pointer over certain highlighted words or phrases. Unfortunately you need to put a separate entry in the hosts file for each web site that you visit (as you can see I have one for pcadvisor and one for honestjohn).

To save the hosts file you will often have to save it as a different name as it may not let you save it back to itself. In which case, save as, say, hostsnew.txt and then rebame the old hosts file to, say, hostsold. Then rename hostsnew.txt as hosts (the hosts file name does not have an extension).

To identify the domains for the ad servers it is often necessary to view the HTML source of the web pages and search through. Often searching for "ad." or "ads." is sufficient. But sometimes you can find the necessary details just by right clicking the ads themselves.

Note that with the intellitxt ones, I've found the info at the end of the source listing.

Lastly, if you do the above, you will find that in some web pages, the areas that were to display ads will show a "page not found".

  VoG II 11:33 27 Oct 08

I use the hosts file from click here

To eliminate the page not found annoyance click here

  canarieslover 11:35 27 Oct 08

As I commented before this is a brilliant solution. Instead of bookmarking this I have copy/pasted to notepad and I can edit as I need. Thanks.

This thread is now locked and can not be replied to.

Surface Pro (2017) vs Surface Pro 4

20 groundbreaking 3D animation techniques

How to mine Bitcoin on Mac