Firefox loads Ads - other browsers don't

Please follow the below template, it will help us to help you!

Expected Behaviour:

Firefox must not load ads

Actual Behaviour:

Firefox (63.0.3 x64) loads ads on several websites where Chrome and Edge are "clean". I already disabled dns-prefetch and network.trr in Firefox' config but the browsers keeps loading and showing ads on specific websites.

Debug Token:

h2jl6xjqko

Your debug log isn't showing any problems.

Look in the Firefox Preferences > General > Network Settings and ensure you don't have DNS over HTTPS enabled. If you enable this, the DNS requests will bypass your Pi-Hole.

Here is a good FAQ that will help you determine where the ads are coming from. Note that Pi-Hole logs will only show DNS requests that are processed by Pi-Hole (and won't show any that bypass Pi-Hole).

Thanks for your reply. But I already set "network.trr" from 0 to 5 via about:config, which disables DNS over HTTPS under all circumstances.

From this site, either 0 or 5 should give the same result: Getting started with DNS over HTTPS on Firefox | by Nykolas Z | Medium

The first one (trr.mode) controls how  *DoH*  should be used. By default it is set to 0, meaning it is disabled. You can change it to "2" to enable it. The options for the trr.mode are:

* 0 —  **Off**  (default). To use operating system resolver.
* 1 —  **Race**  native against TRR. Do both in parallel and go with the one that returns a result first. Most likely the native one will win.
* 2 —  **First** . Use TRR first, and only if the secure resolution fails use the operating system resolver.
* 3 —  **Only** . Only use TRR. Never use the native (after the initial setup).
* 4 —  **Shadow** . Runs the TRR resolves in parallel with the native for timing and measurements but uses only the native resolver results.
* 5 —  **Off by choice**  This is the same as 0 but marks it as done by choice and not done by default.

Neither "network.trr" set to "0" or "5" had any impact. I checked "about:networking#dns" and had no entry under "TRR" with "true". It's not a big thing because most ads are still blocked in Firefox. But it's interesting that Chrome and Edge don't show these ads.

I don't use any add-on in Firefox. It's a clean install. I set Firefox to clean every web data on close. I also tried the safe-mode but the effects are the same.

I tried this in another network where Pi-Hole is also active. Same effect: Firefox with no add-ons loads some ad elements, Chrome and Edge don't.

Firefox Sync of user data is not active.

Have you checked the pihole log to compare the DNS streams from the non-ad browsers and Firefox (to see if Pi-Hole is processing the same requests)?

Any ad-blockers running on Edge or Chrome?

Do you have an example website where you are seeing the behavior difference?

I suggest to start Firefox with the -p switch:

firefox -p

and to create a new profile. Do you see a different behaviour with that one?

I tried another "hard" approach:

  • exported Pi-Hole settings

  • created a new VM with Debian 9 and Pi-Hole (same system and network settings incl. IP address)

  • reimported all settings with Teleporter

Result: it works as it should. Firefox now blocks ads as usual or seen in other browsers.

So I reimported these settings in my other network's Pi-Hole and there everything runs fine too.

Dunno what the problem was (maybe some new ad delivery methods which are now blocked again due to a blocklist update?) but I'm happy again. :wink:

Btw: typical (German) websites where Firefox showed ads just below the navigation header are

http://www.pcgameshardware.de/

Another (ugly) page:

Thanks to everyone for your help :sunglasses:

Pi-hole works on the DNS level and cannot block all ads. I strongly suggest to use uBlock Origin in your browser. I don't see ads on those sites. And if there are any which are not blocked by the filterlists, it's usually easy to block them with the Element Picker. This is often the case for cosmetic filtering.

I didn't think I see ads either (cannot read German), with Firefox latest version and no supplemental ad blocking by the browser. DNSThingy on Chrome didn't show any odd ad-serving domains either:

* www.pcgameshardware.de
* script.ioam.de
* aka-cdn-ns.adtech.de
* cdn.cxense.com
* www.google-analytics.com
* rscdn.cxense.com
* cdn.onthe.io
* stats.computecmedia.de
* www.computec.de

Yes, these images are always loaded from the corresponding website and not from any ad-server. Seems to be a new method of ad-delivery or anti-adblocking.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.