Jump to content

HOW-TO: configure MS-Windows to block Google Ads


misterp

Recommended Posts

OK this was a topic at our last GTG and I demonstrated on Pimp SS's laptop but will document the whole topic here. This readme is verbose but the whole operation can be done by a tech support person in less than a few minutes, for those without any computer support training it should take no more than 10 minutes - it's not hard at all, just a little involved and with this step-by-step you will have the direction required to git-r-done :thumbs:

 

Background (oversimplified) - when your computer must get content from other computers/servers on the internet it must first take the human readable web address (or URL, the address that you type into the Address bar which starts with 'http://' or 'https://' or 'ftp://') and it must do a lookup to find the actual numeric network address of the computer being queried; how this mechanism works is beyond this discussion (it's called DNS or Dynamic Name Resolution) but it is exactly like you looking up the phone number of someone you want to call, i.e. when you want to call Pizza Hut you do not type 'pizza hut' into your telephone, instead you must grab a phone book and look up the restaraunt's phone number, then dial those digits to establish a connection; all computers must do this exact same thing to 'talk' with each other. This is what network engineers call name resolution.

 

Normally all this lookup activity happens behind the scenes, most internet users are unaware that this is even happening. BUT, with this knowledge we can hijack the normal name resolution process to our advantage to stop those annoying 3rd party ads.

 

Microsoft Windows allows us to manually tell our computer the numeric addresses of websites (or, 'keep our own phonebook' if you will); this is done in a very special text file on your computer called the hosts file. And in this how-to you will fake-out your computer by telling it that the Google ads server is actually your computer - in doing so when it attempts to download from what it believes to be the Google ads server no content will be found (because the computer it 'calls', your computer, is not a web server!) and hence tada! no annoying ads will appear in your web browser. All computer operating systems allow setting of this behavior, but I am going to go step-by-step here for Windows users since I am sure almost all forum members use MS Internet Explorer on MS Windows.

 

Step One - modify your Windows Hosts file:

  • Double-click My Computer, then open the system boot drive (C: drive by default).
  • For most users you will be shown a warning to not view the contents of this drive, but click on the 'show contents of this drive/folder' link to view the files and folders of your boot (C:) drive.
  • Double-click the folder where Microsoft Windows was installed (WINDOWS, by default); again for most users you will be shown a warning to not view the contents of this system folder, but again click on the 'show contents of this folder' link to view the files and folders of your WINDOWS system folder.
  • Find and double-click on the System32 folder;
  • Find and double-click on the Drivers folder;
  • Find and double-click on the Etc folder;
  • You should now see a file simply named "Hosts" - double-click on this file, and in the Open With dialog window double-click Notepad (this will open the Hosts file in Windows Notepad so we can edit it)

01.jpg

  • On the last line of the Hosts file, add "127.0.0.1 pagead2.googlesyndication.com", save the file by clicking on the File menu item and then the Save option, and close any open windows.

02.jpg

 

Step 2 - delete cached Google ads from your computer (Internet Explorer 7 shown, earlier IE versions are very similar):

You must do this; because you have already seen the Google ads you have unwittingly downloaded the script/code to fetch and display these ads. It's behavior is kind of virus-like in that it must be forcefully removed from your computer or you will still be downloading ads even after completing all other steps; this is why clicking the "Delete Web Cache" does not work, because Internet Explorer will not delete script files from the Temporary Internet Files cache (!) so you have to do it the tedious way:

  • Click the Windows Start button, then Control Panel (if you have the older Windows 2000 interface click Start, Settings, Control Panel)
  • In the Windows Control Panel double-click the Internet Options applet, this will open the Internet Properties window
  • In the Internet Properties window click the Settings button under the Browsing History heading

03.jpg

  • In the Temporary Internet Files and History Settings window click the View Files button to expose your browser's web cache aka 'Temporary Internet Files'

04.jpg

  • Sort your Temporary Internet Files by Internet Address by clicking on the Internet Address column header

05.jpg

  • Scroll up or down the list and find all items beginning with http://pagead2.googlesyndication.com, and delete all of them from your computer - you can make this a one-step job by using the shift key with your mouse button to select multiple files at the same time and pressing the 'delete' key on your keyboard.
  • Once you have deleted ALL the temporary internet files which were fetched from the http://pagead2.googlesyndication.com site close all open windows by clicking the OK or Close (X) buttons.

Step Three - reset DNS on your computer:

 

Your computer will not automatically use your Hosts file settings; you must either restart your computer -or- type a system command instructing Windows to flush it's DNS cache, which only takes a split second - to flush your DNS cache rather than restart your computer do the following:

  • Click the Windows Start button, then the Run... menu item
  • In the Open text box, type "ipconfig /flushdns" and click the OK button.

06.jpg

  • After a quick flash of activity, it's done!

Mr. P. :)

Edited by Mr. P. (see edit history)
Link to comment
Share on other sites

What is the difference between doing this and blocking the addy someone else posted in my thread?

 

HERE!

 

That works too :thumbs: The method described here is not better or worse, just a bit more old-school as only the latest browsers support URL blocking. Also, by redirecting the server via the hosts file it will work for ALL software on your computer, not just Internet Explorer.

 

Mr. P.

Link to comment
Share on other sites

YO, P diddy. you got a trick up your sleeve for firefox users?
Nope, never installed or used Firefox; my thinking - why drive a Pinto when you can be driving a Caddy. I let my PFYs do the regression/cross-browser validation in our web design work.

 

However, you will do steps 1 & 3 just like described above; step #2 you will have to manually delete the cached files from Firefox, as I have never seen the product I cannot tell you what menu items to click on or buttons to push or show you screen captures - sorry. But once you do that you'll be golden.

 

Mr. P.

Edited by misterp (see edit history)
Link to comment
Share on other sites

YO, P diddy. you got a trick up your sleeve for firefox users?
Nope, never installed or used Firefox; my thinking - why drive a Pinto when you can be driving a Caddy. I let my PFYs do the regression/cross-browser validation in our web design work.

 

However, you will do steps 1 & 3 just like described above; step #2 you will have to manually delete the cached files from Firefox, as I have never seen the product I cannot tell you what menu items to click on or buttons to push or show you screen captures - sorry. But once you do that you'll be golden.

 

Mr. P.

 

 

P, i have no problems following your tutorial as technical support is my profession. it seems that FF treats the java script apps differently than IE therefore its still looking for the ads on the page although the url's is pointed locally.

Link to comment
Share on other sites

For all of you people not living in the stone age and using firefox....here is your solution

 

just download the Adblock plus extension from here.

 

This works EXCELLENT....it not only blocks the google ads, but it will block EVERY ad that you come across.

 

Just go to the website and click install at the top of the page....it will restart firefox and you can click on the USA subscription of ads to block...it is amazing. It actually even blocks the supporting vendors ads at the left of this page, and will clean up any webpage that you want to view. I hate getting on other computers now because I'm not used to seeing advertisements anymore.

Edited by TexaSS (see edit history)
Link to comment
Share on other sites

i use netscape, will this work the same? got to do something becouse now it takes 15-30 sec to load a page :banghead: and every time i open a topic it"s worse then dial up, and i have cable...... :banghead::mad::puke::sick::rant:

 

:seeya:

As I said above, steps 1 & 3 are the same, but you are going to have to figure out for yourself how to manually delete the googlesyndication.com script file (step #2) as the Netscape procedure will differ from the instructions given above for IE users.

 

Something you can try, but no guarantees because it's been 10 years since I used Net-scrape: under the Tools menu click Options menu item, then bring up the Privacy folder tab; in the Cache settings box there should be a button to nuke the whole cache - hopefully it's better behaved than Microsoft IE and actually deletes the cached script files as well... Then close and restart your Netscape and see if that arrested the 3rd party ads.

 

Mr. P.

Link to comment
Share on other sites

  • 2 weeks later...

Is it just me, or should advertising like this be illegal? I mean it's no different than someone throwing ad wraped bricks into your home while you are watching television. All it does is congest the internet and pollute it. And frankly I had no idea why the google ads were all over everything I looked at. They are very much gone now though... Thanks Mister P. Anything else we can do like this? Any god websites to look at?

Link to comment
Share on other sites

Is it just me, or should advertising like this be illegal? I mean it's no different than someone throwing ad wraped bricks into your home while you are watching television. All it does is congest the internet and pollute it. And frankly I had no idea why the google ads were all over everything I looked at. They are very much gone now though... Thanks Mister P. Anything else we can do like this? Any god websites to look at?

I manage a small network here and I was shocked to discover that 1/4 of the network traffic was ads & click-through tracking - we pay $1100/month for our internet, that means the company is paying $275/month or over $3000 per year to carry this crap. And we are paying just over double that on receiving/filtering junk email.

 

Mr. P.

Edited by misterp (see edit history)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...