Gizmo's Freeware is Recruiting

Gizmos Needs YouWe are currently looking for people with skills and/or interest in the following areas:

- Anonymous Surfing Service
- Antivirus for Android

If this sounds like you then click here for more details

 

How to Remove Google Text Ads

It seems that almost every web page you view these days has Google AdSense texts ads spread across the top or down the side.

These ads have never bothered me. They are easy enough to ignore and besides, website owners are entitled to earn a living just like the rest of us.

However, lately some sites have started embedding the Google ads in the center of the page or worse still, right in the middle of a block of text. So I decided enough was enough and started looking for ways to block the ads.

It turns out that it's dead easy to stop them. In fact there are many ways you can do it. For example Firefox users can use the AdBlock or CustomizeGoogle extensions to kill the ads while Internet Explorer users can use one of the many ad-blocker add-ins such as AddSubtract, WebWasher or the excellent freeware program IE7Pro.

Perhaps the simplest and most universally applicable method is to use the Windows Hosts file to block the address of the Google ad-server.

There is another advantage in using this technique; it will help you develop an understanding of the Hosts file and its many uses.

The Windows Hosts file

This a file on your computer that can be used to locally translate the names of web sites into IPs. IPs are sets of four numbers separated by dots like 65.109.128.16. They are the real addresses of the internet not web site names (URLS). Names are only a convenience and have to be translated into IPs. For example, the name (URL) of my website is techsupportalert.com but its IP, its "real" address on the internet, is actually 72.52.134.218.

Normally this kind of translation takes place at your ISP. They have a special server dedicated to the task called a DNS server. Whenever you type a URL like www.techsupportalert.com into your browser address window, the DNS server translates the name into the corresponding IP 72.52.134.218. It's automatic and requires no involvement from you.

However, you can also do it locally on your own PC and that's where the Windows Hosts file comes into play.

The Hosts file is just a plain text file containing a simple list of web site names (URLs) and their corresponding IPs. Here's an example of what a Hosts file might look like:

216.109.118.69  www.yahoo.com
72.52.134.218    www.techsupportalert.com
216.239.115.141 www.cnet.com

You can think of this like an address book. In an address book you look up a name and find the address. With the Hosts file you look up a web site name (URL) and find the address (IP). In the example above, any reference to the name www.yahoo.com will directed to the address 216.109.118.69.

Now, the Hosts file on most computers has nothing in it. That's fine because the DNS translation is usually handled by your ISP.

If your Hosts file does have entries then these are used for the DNS translation for those sites instead of your ISPs DNS server. This is actually fractionally quicker as it saves a step. In fact. some web accelerators store thousands of popular sites in your Hosts file to take advantage of this slight increase in speed.

But there's another common usage for the Hosts file: to block addresses. This is done by using a dummy address, typically 127.0.0.1, that goes nowhere. For example, consider this entry:

127.0.0.1 wwww.yahoo.com

With this entry in the hosts file, any reference to www.yahoo.com will be redirected to the address 127.0.0.1. Now that address is not a valid web address for any real web site. In fact, by convention it refers to your own computer.

If you have this entry in your Hosts file and you type www.yahoo.com into your browser, you'll get an error message: "Host cannot be found."

This is the very technique that we can use to block Google text ads.

Stopping Google Ads with the Hosts File

All the Google text ads seem to come from the addresses pagead.googlesyndication.com or pagead2.googlesyndication.com. If we place these names in the Windows Hosts file and point them to a dummy address then the Google ads will not appear.

First though, we need to locate the hosts file. Here is the usual location for the major Windows versions:

Windows 9x, ME C:\WINDOWS
Windows NT (and some 2K) C:\WINNT\system32\drivers\etc
Windows 2K, XP, 2003, Vista C:\WINDOWS\system32\drivers\etc

The Hosts file is simply called "HOSTS" and has no file extension.

It's a simple text file and must only be changed with a plain text editor like Notepad and never a word processing program such as MS Word.

First, we need to open the Hosts file in Notepad. If you don't know how to do that then locate the Hosts file in Windows Explorer and right-click on it. Select "Open" and then check "Select the program from a list." You'll then be presented with list of programs; select Notepad. You should now see a simple text file.

Go to the first blank line at the bottom of the file and type in ( or copy and paste) these two lines:

127.0.0.1 pagead.googlesyndication.com
127.0.0.1 pagead2.googlesyndication.com

Make sure you leave no blank lines before this entry.

Just save the file and you are finished. Saving this change may spark an alert from your anti-spyware software but it's OK, just approve the change.

If you've followed the instructions carefully you should never see Google AdSense text ads again. If at a future stage you want to see the ads again, just use Notepad to delete the line you just added.

The same technique can be used to block other advertising servers, malicious spyware or sites containing inappropriate material. In fact a number of folks offer free downloads of Hosts files containing thousand of entries of such unwanted sites.

I'm not a great fan of using the Hosts file for such large scale blocking. To me it's too unselective - I prefer to know exactly what I am blocking and this is virtually impossible with a list containing thousands of sites. However if you want to play with this kind of application, here are some Host file download sites:

http://www.hosts-file.net/
http://www.mvps.org/winhelp2002/hosts.htm

Dedicated Host file enthusiasts may want to check out Hostess, a free Hosts file editor/manager you can get from here: http://www.raymarron.com/hostess/

Gizmo

 

Share this
4.39785
Average: 4.4 (93 votes)
Your rating: None

Comments

by Venkat (not verified) on 30. January 2012 - 14:39  (88036)

Thanks for the useful info. I tried everywhere to remove these google ads but couldn't do it even with anti-virus, anti-malware programs. Now my problem is solved. See how Google is making us view their ads. Very unethical practices!

by Teo on 10. January 2012 - 14:02  (86939)

I think that much easy way to remove Google and other ads is to use Adblock Plus + Element Hiding Helper extensions which are now available for FireFox, Chrome and K-Meleon. There are also some clones for IE as well. Those extensions are blocking a lot of different ads based on subscription lists or individual rules which are not touching any system files.

by GW (not verified) on 14. January 2012 - 16:14  (87172)

Does anyone know how to do this on an Acer A500 Tablet?

by timeman (not verified) on 7. January 2012 - 19:37  (86778)

Main problem I have is slowness loading sites. I don't care whether the ads appear or not. While I'm waiting up to a minute for site to load, I always see that pagead2.googlesyndication.com text just sitting there in lower left. So I applied article advice, put in the two lines as instructed in Notepad. The lines saved properly. But the same problem persists. In fact, it's even hanging up by about a minute my attempt to preview this comment. Is there a product out there that will fix this?

by lasersquad (not verified) on 10. January 2012 - 10:16  (86931)

It`s possible your slowness might be caused by many other things, like malware or some Windows conflict.

Google has also other domains spamming like variants of googleads that always seem to sneak through. i use opera and finally got tired and blocked the very google.com/* itself. Guess what, Internet didn`t collapse and the ads are gone ;)

by sml156 (not verified) on 1. August 2011 - 0:07  (76639)

I have been useing HostMan for quite a while it does the same thing only it block's around 100,000 sites that either ads or nasty . just a tip for people that use yahoo just take the ads file and the partial file and use server as a startup service

by ACruz (not verified) on 23. May 2011 - 13:32  (72540)

I don't think we need to fiddle with the hosts file.
I'm using Firefox's BlockSite extension and it seems to work just fine.
Thank you for taking the time to write it down.
This Google's hegemony is really VERY annoying.
Cheers,

by Wiaty ogrodowe (not verified) on 5. May 2011 - 21:12  (71484)

Yeah very good solution, but as u have seen most of blogger earn some money for their informations. Novadays nothing is for free, you have to pay almost for everything!

by Flessan (not verified) on 22. April 2011 - 15:37  (70701)

Worked PERFECTLY in Windows 7 and didn't affect anything else, thanks! Path in Windows 7 was the same as Windows 2K, XP, 2003, Vista (C:\WINDOWS\system32\drivers\etc). As mentioned by pdfcayman, open notepad as administrator, then do a file/open and browse to the file. The file HOST does not have an extension, so be sure to select all files from the drop down list so you can see it.

Flessan

by Google is now an evil virus (not verified) on 11. January 2011 - 17:46  (64296)

Does not work for domains.googlesyndication.com
WHY?

by notvalidname (not verified) on 6. December 2010 - 11:06  (62088)

is there a way to remove the google ads on top of your gmail? it seems the feed isn't coming from the page#.googlesyndication.com.
it is really annoying as it is based on your email content and just like stealing things in front of you.

by ianjrichards on 6. December 2010 - 20:38  (62119)

No, these ads are embedded in the page HTML and cannot be removed using any technique I'm aware of. - Gizmo

by Fidani (not verified) on 19. November 2010 - 0:11  (61367)

thank you <3.

by pdfcayman (not verified) on 25. August 2010 - 4:51  (56678)

The easiest way to edit the HOSTS file and save it in Windows 7 is to right click on Notepad and select "Run as Administrator". You can then browse to and File/Open HOSTS, edit it and save it without amending security settings which can compromise security in your computer. HOSTS is protected because malware can and will use it if it can to redirect your web access. This is why you cannot simply navigate to it, double click to open it and then save your edits.

by Anonymous on 2. April 2010 - 0:13  (46717)

great article

by Anonymous on 20. February 2010 - 17:06  (44051)

I had to use a few comments for this to work. I couldn't save it with either text or all files. So I had to go into properties and click allow for administrator and user. Then it would let me save it. But the wierd thing is I went back to the website that puts the ad in the middle of the text I want to read and it was still there. But when I refresh, it is gone. It does this everytime!! Wierd...any suggestions? Windows Vista here.

by Anonymous on 5. January 2010 - 11:13  (40316)

Thank you. It work`s.

by Anonymous on 17. October 2009 - 19:43  (34883)

Its easy if it blocks something u want,just open hosts in notepad,and take out the domain u want,or use hostman,is easier,or host manager.U can replace the ads with pics or words,whatever u want if u use a local server.One comes with hostman,or use homer.Have been using for years,brilliant.Using localserver will speed up browsing if u have a large host file.Main reason for host really is to block bad websites that give u viruses/malware.Blocking ads is just extra really.

by Anonymous on 28. September 2009 - 22:52  (33501)

I use Adblock Plus and NoScript in Firefox to block any type of ads, including those of Google.

by Anonymous on 22. December 2009 - 23:07  (39181)

Thankyou very much, adblock has done the trick for me you are a star...

by Jojoyee on 31. August 2009 - 8:39  (31934)

After seeing too many Google text ads, I decided to give this a try.

I've one page open with an ad, adding the two lines as you said, open the same page again and the ad is gone. It works like a charm.

Thanks Gizmo.

p.s. It works on Win 7 too, same location as XP and Vista.

by Anonymous on 16. August 2009 - 11:20  (27206)

The thing used to work fine on XP. I recently changed to vista and tried the same procedure but it is not working. The last line just above where I pasted the pagead.googlesyndication.com says'::1 localhost' . Is this making it not work. Help.

by Anonymous on 13. August 2009 - 5:58  (26988)

VISTA home basic.
I followed directions, went here C:\Windows\System32\drivers\etc opened hosts in notepad, cut & pasted the two lines (no spaces) and it wouldn't save. Took a hint from Anon. #4, and here is specifically what worked (shout out to the computer dummies!):

I R-clicked hosts, went to properties and then security, hit 'edit' under change permissions, highlighted Administrator and clicked 'allow' for everything.

Then I followed the instructions again and worked fab - THANK YOU GIZMO

by Anonymous on 15. July 2009 - 14:14  (25145)

this stupid thing worked so the adds went away but so did the entire facebook,and nothing works anywhere now.
so how i remove this and get it back to normal before i followed this idiot idea

by Anonymous on 15. July 2009 - 0:05  (25107)

HOw Do I get rid of this crap with the ads popping up and blocking information on the website Im on.!! Example: Facebook
PLease help and thanks :)

by Anonymous on 7. February 2009 - 7:53  (15543)

If there is error messages in the places where the ads use to be, just unchek "show friendly HTTP error messages" in internet options advance tab.
and please guys stop unloading free spy software.

by Anonymous on 17. December 2008 - 14:19  (12001)

I needed to take ownership on my vista hosts file before it would save. Kept whining about "locked by another application" Luckily, I have the "take ownership" item in my context menu enabled so I just right clicked, took ownership and saved it. Works like a charm

by Anonymous on 10. November 2008 - 10:58  (10286)

Hello hello from greece

this article worked also for me to get rid of the stupid/f****ng google ads, that comes with some blogger templates.
just go the edit html tab, on blogger menu
and within the code search for the phrase pagead.googlesyndication.com
erase the whole sentence and VOILAAAAAAA no ads included in your theme.

thank u mate and have a great day

by Anonymous on 18. September 2008 - 15:41  (7979)

Does anyone know how to find the google T5 browser bar, apparently this is blocking access to the plentyoffish.com site according to their open forum. I don't even know if windows 2000 has the T5 bar I can't seem to locate it. I've always used google as my main search engine and have used POF site for a year and no problems. I just fixed the googlesyndicate issue thinking that was causing my problems with POF but it doesn't seem to have helped any. Anyone else out there having these issues?

by Anonymous on 25. August 2008 - 1:29  (6863)

I used to use the hosts file when I had dial-up and stopped when I got broadband. I decided to give a try to the suggestion for just pagead.googlesyndication.com and pagead2.googlesyndication.com. What I found were long pauses while my browser was trying to access one of those sites. It's like it is waiting to receive something from the site and then times out when it does not receive it. I commented out the 2 lines in the hosts file and then I had no pause while it was trying to access those sites.

Post new comment

The content of this field is kept private and will not be shown publicly.