Sick of these ads?
Posted by Niall in Advertising, Downloads, Hosting, Links, Linux, Marketing, Software, Technology, Website, Windows, spam on 03-Feb-2010 at 7:59 pm GMT.
0
If you're new here, you may want to subscribe to my RSS feed or follow me on twitter. Thanks for visiting - and be sure to leave a comment on any post that interests you!


Sick of these ads? Of course you are… Well what if you could avoid them altogether?
Here’s a simple tip that heps you do just that,- stopping images and pages from a long list of notorious web sites from being displayed on your browser. These particular ones are hosted on the domain “content.yieldmanager.edgesuite.net” and link to a url at “ad.adperium.com” – literally just a couple of sites among many which are purely for shoving advertising and spam down the viewers throat.
One easy way to stop such ads appearing is to use customise your HOSTS file. This is basically like a local version of a DNS server (those servers that translate domain names into numbers so your browser can find web sites). In the HOSTS file, you’d have a list of all the sites you want blocked and have them correspond to 127.0.0.1 (also known as “localhost”) – so that your browser would try to load the images and pages from your own PC instead of the actual web site.
Handily, someone’s already written a customised HOSTS file for you to use and it’s pretty simple to install. First things first though, – better safe than sorry.. back up the file you’ve got.
In Windows XP, Vista or 7:
Press the Windows key & “R” together to bring up the Run dialog box, then enter:
%SystemRoot%\system32\drivers\etc\
In the folder that pops up, copy the file “hosts” to something like “hosts.bak” to back it up
Then right click here and choose “save link/target as…”. Enter “%SystemRoot%\system32\drivers\etc\” (without the quotes) and hit Enter in the dialog box that pops up to change the folder, change the file type to “all types” and you should see the hosts file there – click that and hit save to overwrite it.
(Note: Windows Vista and 7 may not let you download files into the etc folder. If this is the case, just change the permissions on the file first, by right clicking it, then clicking properties, then security, hit the Advanced button, then Edit, double click on the Users () line and tick the Full Control box. Then close all the dialog boxes by hitting Ok and try downloading and overwriting the file again. Bingo.)
In Ubuntu Linux (should work in other Linux distributions or Mac OSX too):
Open the terminal and enter:
sudo mv /etc/hosts /etc/hosts.baksudo wget -c http://zelut.org/projects/misc/hosts -O /etc/hosts
(You’ll have to enter your admin password the first time you use ’sudo’. Still… much simpler in Linux, eh?)
And that’s it… the hosts file you’ve just installed (which I didn’t write, but is freely available for distribution) contains references to over 15,000 nasty sites which will now be mapped to your PC. You can, of course, add domains to the list yourself by simply editing the file. As the images and pages at those URLs won’t be found on your PC, the browser will show either nothing or a broken image icon in its place.
The only issue that this sometimes throws up is that, depending on your setup, it can take some time for your browser to fail in the search for the non-existant image – this can be gotten around by installing something like Hostsman (Windows only, unfortunately) which has a built-in web server so that the browser can show a blank image in place of the missing one.
Note: While you could just install a plugin like Adblock Plus to block ads in Firefox, – that works on an ad-by-ad basis in just one browser whereas this hosts file solution will block the sites in every single program on your computer.
Hope this helps.
No related posts found.