Results 1 to 10 of 13
- 08-01-2009 #1
Block Google, MSN (Windows Live) and Yahoo Ads using Hosts File
Block Google, MSN (Windows Live) and Yahoo Ads using Hosts File
Are you irritated by the numerous ads 'served' to you while you are browsing the web. If you do, here is one way you can save yourself from all that 'stress'. All you have to do to block ads, banners or cookies is by 'tweaking' windows hosts file.
For those of you who do not know what a hosts file is, here is a short background information:
"The Windows Hosts file contains the mappings of IP addresses to host names. This file is loaded into memory (cache) at startup, then Windows checks the Hosts file before it queries any DNS servers, which enables it to override addresses in the DNS. This prevents access to the listed sites by redirecting any connection attempts back to the local machine. Another feature of the HOSTS file is its ability to block other applications from connecting to the Internet, providing the entry exists.
When a web site or application calls up an advert it normally uses a standard URL like www.anADVERTsite.com which like any URL typed into a web browser must be translated into a machine recognised numerical identifier (IP address) which is a unique identifier of a location on the internet."
Explanation of why 'editing' the hosts file works in blocking ads:
By editing the hosts file, the HTML or Java-Script used to call the ads would be unable to reach these ads servers or engines, which are mainly used to serve the ads to you. .
Alright, let us begin editing the hosts file of your system.
First of all, we navigate to the folder containing the hosts file.
Location of Windows Hosts file:
Windows 95/98/Me
C:\Windows\hosts
Windows NT/2000/
C:\Winnt\System32\drivers\etc\hosts
Windows XP Home/XP Pro /Vista
C:\Windows\System32\drivers\etc\hosts
(Note that you may need administrator access for Windows NT/2000/XP/Vista)
Locate the hosts file, and right click on it. Select Open.When prompted with "Open With" dialog box to choose a program you want to use to open this file, select any one of these:
Notepad
Wordpad
Any other text editor.
Block Google Ads
Add the following lines to your windows host file and block Google from serving ads on your computer. It also helps to cover your track when visiting sites that use Google Analytics.
127.0.0.1 pagead.googlesyndication.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 adservices.google.com
127.0.0.1 ssl.google-analytics.com
127.0.0.1 www.google-analytics.com
127.0.0.1 imageads.googleadservices.com
127.0.0.1 imageads1.googleadservices.com
127.0.0.1 imageads2.googleadservices.com
127.0.0.1 imageads3.googleadservices.com
127.0.0.1 imageads4.googleadservices.com
127.0.0.1 imageads5.googleadservices.com
127.0.0.1 imageads6.googleadservices.com
127.0.0.1 imageads7.googleadservices.com
127.0.0.1 imageads8.googleadservices.com
127.0.0.1 imageads9.googleadservices.com
127.0.0.1 partner.googleadservices.com
127.0.0.1 www.googleadservices.com
127.0.0.1 apps5.oingo.com
127.0.0.1 www.appliedsemantics.com
127.0.0.1 service.urchin.com
Don't forget to save the 'edited' hosts file.
For those of us who are using Firefox, we can make use of two add-ons/extensions to block Google ads:
Google also serves ads (to be more precise, text ads) in an iFrame. Therefore, to block Google text ads, it is important to block iFrame coming from ad servers, and in this case, Google’s ad servers. We can do so by installing the Adblock Plus extension. After Adblock Plus is installed, go to the Tools > Extensions menu, highlight Adblock, and click the Options button. In the New Filter: input box, paste this: http://*.googlesyndication.com/*
P.S. Make sure that in the Adblock preferences window, it is set to Remove ads instead of Hide ads.
There is also another extension/add-on known as CustomizeGoogle which lets you block Google Analytics cookies. Using this feature makes you more anonymous. But your visit on a single webpage can still be logged. This way, both Google and the owner of the website knows that someone visited a webpage, but it's difficult to track all pages you're visiting.
Block MSN (Windows Live) Ads
Add the following lines to your windows host file and block Windows Live/Hotmail/MSN from serving ads on your computer.
127.0.0.1 view.atdmt.com
127.0.0.1 rad.live.com
127.0.0.1 rad.msn.com
127.0.0.1 live.rads.msn.com
127.0.0.1 ads1.msn.com
Don't forget to save the 'edited' hosts file.
Block Yahoo Ads
Add the following line to your windows host file and block Yahoo Messenger from serving ads on your computer.
127.0.0.1 insider.msg.yahoo.com
Don't forget to save the 'edited' hosts file.
Now, whenever you login to Gmail, Windows Live Mail, Ymail, you will no longer see ads.
Additional information:
If that isn't enough for you, you can block more ads by using an already 'tweaked' hosts file which has already added numerous entries/lines in order to block numerous 'sources' of advertisements. For example. you can download it from MVPS.org
http://www.mvps.org/winhelp2002/hosts.htm
Download the zip file from here and extract:
http://www.mvps.org/winhelp2002/hosts.zip
However, take note guys that in most cases a large HOSTS file (over 135 KB) tends to slow down the machine especially if you are using Windows 2000 and XP. To resolve this issue (manually) open the "Services Editor"
* Start | Run (type) "services.msc" (no quotes)
* Scroll down to "DNS Client", Right-click and select: Properties
* Click the drop-down arrow for "Startup type"
* Select: Manual, click Apply/OK and restart.
Sources:
http://labnol.blogspot.com/2004/10/t...osts-file.html
http://labnol.blogspot.com/2005/11/p...-tracking.html
http://labnol.blogspot.com/2007/05/s...t-removes.html
http://underscorebleach.net/jotsheet...oogle-text-ads
http://thenonhacker.deviantart.com/journal/18675053/
Update:
Oops, I forgot that changing the hosts file in Vista is a bit 'different' due to UAC. The 'problem' is if you try to modify your hosts file in Vista, it will not let you save it. It tells you that you don't have permission.
So here's how to successfully modify the hosts file:
1) Browse to Start -> All Programs -> Accessories
2) Right click "Notepad" and select "Run as administrator"
3) Click "Continue" on the UAC prompt
4) Click File -> Open
5) Browse to "C:\Windows\System32\Drivers\etc"
6) Change the file filter drop down box from "Text Documents (*.txt)" to "All Files (*.*)"
7) Select "hosts" and click "Open"
8) Make the needed changes and close Notepad. Save when prompted.
Source: http://geekswithblogs.net/thibbard/a...leInVista.aspxThey call me the mysterious one...
my motto is...when it's hot, chill baby
- 08-02-2009 #2
I use Hostman which blocks over 70,000 parasites..
It is beta but stable, been using this for about a year now with no issues.
http://www.abelhadigital.com/
Loads more info here
http://www.mvps.org/winhelp2002/hosts.htm
- 08-02-2009 #3
YOu know that linux has a hosts file exactly like the windows one? you can look at it through:
and then add sites to it, just like with windows. :PCode:cat /etc/hosts
- 08-03-2009 #4Tech God
Achievements:




- Join Date
- Apr 2008
- Location
- Behind You, Your Country
- Posts
- 1,262
- Liked
- 0 times
Mac OS X also has a hosts files. In 10.5 Leopard, it's under /private/etc/hosts. You can access and edit through the Terminal with the command. You do need to have the password to the account you're using to edit it.
Code:sudo nano /private/etc/hosts
B> Life

- 08-03-2009 #5
Maybe because Max OS is based on UNIX it has that
- 08-03-2009 #6*nix Technical Support
Achievements:




Awards:
- Join Date
- Jan 2009
- Location
- /home/hellnoire
- Posts
- 10,234
- Liked
- 295 times
Bray, you can test for me if you'd like but I think you need to use it under root access to access and save the Hosts file.
pacman -Syyu life not found in sync db
- 08-05-2009 #7
Nope, don't need root access to edit the hosts file in linux.
- 08-05-2009 #8
Thank you.
This user has not enabled signature viewing, if you wish to view this user's signature please upgrade to a Raymond Gold account.
- 08-05-2009 #9*nix Technical Support
Achievements:




Awards:
- Join Date
- Jan 2009
- Location
- /home/hellnoire
- Posts
- 10,234
- Liked
- 295 times
- 03-02-2011 #10
i edited host file but i still see yahoo ads ??
Love me , Hate me but you just can't Ignore me 
Similar Threads
-
Using a large HOSTS file on a home network
By jelson in forum General ForumReplies: 6Last Post: 05-05-2011, 09:10 AM -
News Server or File Hosts????
By narender in forum General ForumReplies: 2Last Post: 03-13-2011, 10:12 PM -
What does orignal hosts file look like?
By luffy in forum General ForumReplies: 9Last Post: 12-20-2010, 11:58 AM -
Cannot open google, yahoo etc [not hosts file problem]
By vickystylton in forum NetworkReplies: 7Last Post: 07-19-2010, 08:14 AM -
Blocking Unwanted Parasites with a Hosts File
By smalldog in forum SoftwareReplies: 0Last Post: 08-16-2009, 04:01 PM


LinkBack URL
About LinkBacks




Reply With Quote




