I have entered AliExpress site to buy something. Now I always get ads in YouTube and other sites; some ads advertising some underwear and so on. This is annoying. How can I block them?

  • 1
    Pretty confident this is not malware or a virus but just one of the insidious ways the ad world online works. Meaning your IP address, system info and ad profile are stored somewhere. And then when you go to YouTube and other sites they cross check “you” in their system with your activity and just display ads. Mar 8, 2015 at 7:51
  • 2
    Agreed with @JakeGould, and I've observed this myself -- a few months ago, I spent an afternoon looking for a replacement plug online for an appliance with a weird non-standard socket, and ever since then Google has been convinced that I must really like old German power plugs, and is showing me ads for them all the time. Still, at least it's better then the spammy dating sites I used to get ads for, presumably based on general demographic targeting (30-something single male). Mar 8, 2015 at 10:56

2 Answers 2


Assuming you don’t have spyware installed showing you those ads, use Chrome and the AD Block extension and they should disappear.

To prevent tracking (retargeting) as opposed to blocking the ads have a look at something like Ghostery. More do not track info can be found here.

  • This is not about spyware or ad blocking but rather if I were—for example—to go to Amazon right now and do a search for something, even if I reset my browser in some cases the fact that my account was used to search for such items would show similar items when I login to Facebook or any place. Mar 8, 2015 at 7:49
  • 1
    AB Block worked, but it is not free?
    – Narek
    Mar 8, 2015 at 7:54
  • @Narek “AB Block worked, but it is not free?” Your question never asked for a “free” solution. If “jotap” provided you with an answer that works based on the question you presented, then this answer should be checked off. Mar 8, 2015 at 7:58
  • 1
    This is called retargeting where a tracking beacon is put on your browser that advertising networks recognise. If you don't want to be tracked like this use something like Ghostery. Also read about do not track here donottrack.us
    – jotap
    Mar 8, 2015 at 8:00
  • 1
    @Narek adblock is donationware is my understanding. Answer updated to include retargeting and do not track
    – jotap
    Mar 8, 2015 at 8:03

For Google Ads specifically, you can configure what kinds of advertisements Google will show you at https://www.google.com/settings/ads.

In particular, near the bottom of the page, there's a section titled "Opt-out settings", with two links that you can click to opt out of contextual ("interest-based", in Google terminology) ads both on Google itself, and on other sites using Google ads. You'll still see ads, but they will not be targeted based on your demographics or browsing history. See this help page for more details.

(Apparently, what those opt-out links technically do is set a cookie in your browser, on the domain .doubleclick.net, with the content id=OPT_OUT, which Google uses as a signal not to show you targeted ads. There's also a browser plugin by Google that you can install to set that cookie permanently; you can browse the source code to see what it does internally.)

If you'd prefer somewhat more fine-grained control on which ads you'll see, you can also block unwanted ads from specific advertisers or for specific sites. That said, you may also want to check your interests and demographic info on the Google Ads Settings page I linked to above, since if Google thinks that you're, say, interested in lingerie, just blocking specific advertisements for them may not be particularly effective, as Google will just show you other ads for the same stuff.

There are also a few things you can do directly in your browser settings to avoid being subjected to contextual ads:

  • Clear any cookies. In particular, for Google ads, you'll want to remove any cookies from the domain doubleclick.net (except maybe the opt-out cookie mentioned above). If you've been browsing with default privacy settings, you'll probably find you have cookies from dozens and dozens of domains that you've never visited — those are third-party cookies, most of them set by advertisers, and you can pretty safely just clear them all out.

  • To keep those cookies from coming back, you may want to disable third-party cookies in your browser. There are a very few legitimate sites that may need such cookies to function properly (the Google Play Books online reader is one example), but most browsers will let you configure specific exemptions to allow cookies from those sites.

  • While you're at it, consider also setting your browser to clear out all cookies at the end of each session; you probably will want to configure exemptions to that, for sites that you want to stay logged in on, but it does wonders for keeping your browser from accumulating cookie cruft.

  • Configure your browser to send the Do Not Track header, which essentially acts as a global opt-out from targeted ads, telling any compliant sites not to store any tracking information about you that could be used to customize ads. Of course, there's no guarantee that any particular site or ad network will respect it, but it can't really hurt, either.

There are also several browser extensions that you can install to improve your browser's privacy and security. (But do be careful — just because an extension says it improves your privacy doesn't mean it actually will, and any extension you install has effectively full access to everything you do on the web. You do not want to install a malicious browser extension.)

One extension I'd personally recommend is NoScript for Firefox — it's not an ad-blocking extension per se, but it does tend to eliminate 99% of the annoying JavaScript-based ads (as well as, alas, some generally legitimate and harmless ads, unless you explicitly whitelist those), and it includes a number of other security features in addition to its main feature (the ability to selectively allow which sites may execute JavaScript), such as the Application Boundary Enforcer, which can be used to block third-party requests from/to specific sites.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.