Ad blocking plugins typically load the entire Webpage (ads included) and then run some scripts to detect and hide the ads. This is the sort of thing ad blocking testers will test for.
Since Pi-hole prevents ads from being downloaded in the first place by intercepting the DNS request, these traditional ad block testers will often present a false-positive since they are not checking for this sort of activity. It's not always the case, but they aren't the most reliable way to test if your Pi-hole is actually blocking ads. That is bound to change as DNS-based ad blockers continue to gain adoption, but for now, this is the reason why it doesn't always work.
That said, the best way test your Pi-hole is to simply browse some real-life Webpages and
tail the log file for blocked queries.
We've put together a list of sites and pages that have a lot of ads on them. You should see some decent activity in your Pi-hole's Web interface after visiting these sites; and you should not see advertisements!
We created the Block Ads! checker you posted a screenshot of. I'd be happy to see if there's something we can do to improve results for Pi-hole users.
At the moment, the test is a fairly simple one, involving the loading of images from ad servers and seeing if those images load. So blocking at the DNS level should still show that the ads didn't load.
We try to check if the user's browser loads two images. The first one is from
widgets.outbrain.com. If this loads, we'll assume no ad blocking. The second one is from
gstatic.com to test for and warn that 'acceptable' ads are being let through.
The screenshot you've posted suggests the image at
widgets.outbrain.com has not been blocked. Either because Pi-Hole is not blocking it, or maybe because of a DNS cache on the computer being used from a previous request.
If you have suggestions for how to improve this, happy to try and help.
Keyvan from FiveFilters.org
I was able to get a partial detection on your tester, but I'm not familiar enough with Web design to know how to detect Pi-hole since is does work slightly differently then browser-based plugins. If you'd like to work together on it, please send me a PM and we can continue the discussion there.
@fivefilters any feedback to my last message?
Hi Jacob, sorry about the very slow reply. I think the issue here is the second test. That second test was designed for detecting ad blockers with 'acceptable' ads policies that users might be unaware of. Either we find a host that's whitelisted on those lists but not with Pi-hole, or, a better approach might be to create a version of our tester for Pi-hole users. Then you could point to that, rather than the regular one. I'm happy to do that, and it should only be a slight modification of what we have. I'll PM you soon to see if that's something you'd be interested in.
Yes, I would be interested. I'd be happy to collaborate on this effort.
Hi Jacob, I can't seem to PM on here yet (no link to it). But I've modified the tester for Pi-hole users. It will do the first check only and will link to the config page for pihole if no ad blocking is detected. Have a look here: Block Ads!
If you have suggestions, you can email me on firstname.lastname@example.org (or PM me here, if that works for you).
Solid, it works! Thanks. I'll be sure to link to it from our ad block test page.