Hi everyone.

Installed Pi-Hole on my RP3, and went to one of the "test" sites as listed here:

In particular, I went to (as per the page's suggestion). That particular site shows ads, everywhere.

Is this normal? I get the "visit this site to show DNS queries", but is the Pi-Hole supposed to block all those ads?

Thanks in advance...

Are you sure that your device is using Pi-hole? Try going to http://pi.hole/admin. If that works, then flush the DNS cache of your device (and if applicable, your browser).

Yes, positive.

I originally forced my machine to use only the Pi-Hole as it's DNS; watched the stats move up from there in the Pi-Hole dashboard. Ads are being blocked, but the ones on, and now (I found another site that does the same thing) this one:

Not sure if it's a specific time of ad, or what... very weird behavior.

Try also flushing your cache and visiting the site(s) again.

Flushed cache, still ads everywhere.

Here's something weird; I'm using Chrome 58.0.3029.110 (64-bit) on a Mac. When I use Safari, none of the ads show up. Both browsers had cache cleared out, only Chrome shows the ads. Something else here - if I turn on "AdBlock" in Chrome, it blocks over 60 (!) ads, yet they still show up on the screen.

I would start to wonder if an extension is doing something weird here, but then I realize DNS is being issued network wide, so I can't imagine that'd be it.

Anyone seen this before?

In Chrome (or Chromium-based browsers), you may want to try disabling the QUIC protocol to see if that helps:

Thanks for the suggestion, Jacob.

No dice, unfortunately. I disabled the "flag" in Chrome, blew out the cache, reloaded; ads galore.

It's not a huge deal, as it only seems to be on sites that deliver ads like they do on, or seems both those sites are either owned by the same company or they use the same ad delivery service.

I'm at a loss...

Due to the way Pi-hole blocks at the DNS level, self-hosted advertisements can't be blocked without blocking the legitimate site...

I can't seem to duplicate the issue though. I'm using Vivaldi and I get this when I load an article: is serving ads and its images from its subdomains.

For example AD is being served from AD

Image for news story is being served from news story image

The subdomains are different ..

I dont read but is this the new way to beat adblockers ?

Blocking self-hosted ads makes things much more challenging. It's not impossible, but it is difficult. I'm sure we'll see it more and more as adblocking usage continues to increase. A layered approach usually works well: use Pi-hole to block everything it can, and then follow up with a browser extension.

I just loaded the link "" and there were some ads. Chrome, Mac, PiHole as my DNS with local recursive resolver. (Went back later with Safari and didn't see as many ads, same PiHole, etc.)

I think they are moving ad-serving in-house. There are a lot more "" domains here than I recall seeing in the past, and when I first set up a PiHole and tested this site I don't recall this many ads. PiHole isn't blocking the c-*, and that appears to be how the ads are coming through.

Here's what DNS Thingy reports for the site (loaded the site only, no pre-fetch, no link clicking):

Yeah, so you can easily add all these domains to the blocklist. Pi-hole has no problem blocking subdomains, but as you've just demonstrated, the subdomains are non-sensical and there are a ton of them. Blacklisting them individually may just be an exercise in futility if they decide to make a new subdomain or continue to randomly generate and cycle through them.

Regex blocking will help with this. :smile:

The majority of sites out there will not be self hosting ads for some time because it's easier to just use a third party. The bigger players like Google and Facebook don't have much problem doing this though.

Interestingly, the behavior I see with Safari Mac is different than Chrome Mac. With the Safari browser, none of the funky subdomains from are loading, and I don't see the ads. I don't have an equivalent of DNS Thingy on this browser, so I can't easily see the list of domains being loaded. It does appear that the coding of the html gets a different result depending on the browser.

No ads in Safari, ads in Chrome. Same PiHole, same blacklists, etc.

The query log on PiHole from Safari is much shorter than the query log from Chrome for the site, so the Safari browser is not making the same DNS requests and the ads aren't being served.

regex blocking will not help..
they are serving images on their site with the same pattern.

the "random" string within the subdomain changes for ads vs images with only a few characters different between the two.. the fact that its random makes regex matching pointless.

i am new to pihole so cant offer many suggestions .
the only way i can think of is a scraper that runs every day & gets the current ad domains & blocks them , if you were to go with a DNS based approach

But the way to attack this would be to borrow a page from ad blockers who seem to zap them ( firefox + ublock )

What browser and OS are you running where you see the ads?

chrome 69.0.3472.3 (Official Build) dev (64-bit) in guest mode .. osx

Try Safari and see if you see ads on that site. I'm running Version 11.1.1 (13605.2.8) on OS X 10.13.5.

safari shows the ads & query log, at pihole , shows the same c* domains

Interesting. With Safari on my Mac I see none of the ads or queries to the subdomains. I'll have to find the time to read the html and see why it's different than with Chrome.

On Safari for that website, have you enabled content blockers? That's the only obvious setting I see that would result in this behavior. Pop-ups blocked, prevent cross-site tracking, ask websites not to track all selected on my Safari.

will try those settings with safari.

Very interesting that with firefox dev edition , they are serving images from a different domain.using firefox