Fix: Recommended For You Popup Ads in Browser

A few weeks ago my wife mentioned that she was always getting “Recommended for You” popup ads displayed in her browser whenever she visited a web site. The popup was an ad that would appear in the lower-right corner of her browser window. At first I thought it was related to the site she was visiting until I saw the popup appear on multiple sites. I wasn’t quite sure what was happening so I decided to do a little research.


Fix: Recommended For You Popup Ads in Browser

The Recommended For You Issue

After performing a few tests I determined that there was indeed a problem on her laptop. While visiting a site an ad, with an iPhone or simple rectangle background, would appear in the lower-right corner of the Web browser window. While the ads didn’t appear to impact the laptop, they became annoying after a while.

The ads would appear on many different websites using multiple browsers. She uses Internet Explorer on Windows 7, so I originally thought it was limited to that browser. I was wrong. I launched Google’s Chrome Web browser and noticed that the ads appeared within that Web browser as well.

Next, I logged in with my own separate account and started to noticed the popup ads appear in my browser window as well. After seeing this I determined that it was a system-wide issue, and not related to a specific Web browser or user account.

The Fix

I first started to look at the actual HTML source code of the pages that displayed the popup ads using a Firefox plugin called “Firebug.” This plugin allowed me to go right to the lines of HTML code that displayed the popup ads.

The code indicated that the Javascript file being executed was ga.js from google-analytics.com. This web site is owned by Google, and redirects you to the actual Google Analytics home page, so I was confused at why this file would caused the problem.

I then thought about what could be the root cause, and it would need to be on the local system. I then thought about the “hosts” file, which allows someone to point a domain to a specific IP address.

I opened the hosts file, located in “C:\Windows\system32\drivers\etc”, into notepad to take a look at what was written in the file. I didn’t see anything out of the ordinary, but then I scrolled down and found the problem. The hosts file on the laptop was as follows:

127.0.0.1 localhost
::1 localhost
(200 blank lines)
149.5.18.172 www.google-analytics.com.
149.5.18.172 ad-emea.doubleclick.net.
149.5.18.172 www.statcounter.com.
108.163.215.51 www.google-analytics.com.
108.163.215.51 ad-emea.doubleclick.net.
108.163.215.51 www.statcounter.com.

The line “(200 blank lines)” was exactly that – 200 blank lines that pushed the last 6 entries below the viewing area of the file. What the last lines do is point popular website metrics and ad sites to another IP address. This IP address would then use it’s own copy of common Javascript files to display the “Recommended for You” popup ads.

To solve the problem I deleted the last 6 entries, as well as the 200 blank lines, and then saved the new hosts file. Of course, on Windows 7 I needed to log in as an administrator and change the permissions to allow me to write to the file first.

Once the change was made, the “Recommended for You” popup ads no longer appear in the Web browser. Now I just need to figure out how that file was modified.

PG

About Paul Salmon

Paul Salmon is the founder of Technically Easy. He is a an experienced PC user, and enjoys solving computer-related problems that he encounters on a regular basis.

Facebook | Twitter | Google+

Online Safety

8 Comments

  1. David Geller
    Posted September 18, 2012 at 12:09 pm | Permalink

    I edited as you said ETC: HOSTS
    Only had 2 lines and no extra:

    Copyright (c) 1993-2006 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a ‘#’ symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    ::1 localhost

    Any suggestion? I get an IPhone ad to teh right

    Thanks

    David

  2. Christian
    Posted June 29, 2012 at 11:57 pm | Permalink

    i just checked that file by copy pasting the file you said. then i tried to scroll down and i couldnt there was no extra spaces at all i couldnt even go down the thing by using the down dpad after clicking in so nothing was there and i still have the ads

    • Posted July 2, 2012 at 9:14 pm | Permalink

      If you could send me the file using the contact form form the link at the top of my blog, that may make it easier for me to help you.

  3. Jesse Brauning
    Posted May 17, 2012 at 7:01 pm | Permalink

    I think that main question is how the file was modified, since to write something in the hosts file required administrator rights.

  4. Posted May 15, 2012 at 3:58 pm | Permalink

    wow it was best way to avoid popup ads in spam sites without using any plugins in the browser.

  5. Lakshmi Balu
    Posted May 15, 2012 at 2:41 am | Permalink

    That one real great analysis on the pop ups. These ads annoy the people to heights. This code of having 200 blank lines was so interesting that I did’nt know the solution would be cured so fast!

    • Posted May 15, 2012 at 9:47 pm | Permalink

      The 200 blank lines may have fooled a few people, mainly because they may not realize that they would need to scroll down to find the bad entries.

  6. Posted May 15, 2012 at 1:15 am | Permalink

    I have a doubt?
    Even if someone use a plugin, if google is giving ads, then shouldn’t adblock block it.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

  • About Me

    I am Paul Salmon, an avid technology fanatic who is always learning new things. My goal is to inform and help others with technology.

    With this blog I try to cover various topics on this blog to cover a broad range of topics.

    Read more...

  • Recommended Tool

    Protect your passwords with LastPass

    LastPass is the application that I use to manage my passwords. It is very secure and can I can access my passwords from anywhere on any device. I wrote about LastPass here:

    Click the image above to sign up and receive 1 month of LastPass Premium for free.

  • Recent Posts