How to Anti-Anti Ad Blocking for one website

Hi to everyone.

Some websites like (in Spanish laprovincia.es) are detecting if the user is using any adblocking system even is detecting the pi-hole something that is not usual…

Most blacklist block by default all javascript with the name “ads.js” so what they are doing is perfectly described in:

What I proposed is a more advanced whitelist like if it would be the blocklist to allow just one absolute route of a webpage so the pi-hole admin can allow it for those webpages they want with simple looking at the webpage code.

For example for the webpage I said (laprovincia.es) it would be:
https://estaticos.laprovincia.es/servicios/ads/js/ads.js
https://www.laprovincia.es/elementosWeb/js/ads.js

Do not know if this is could be done with current features because I tried and I failed. If not I think it could be done bypassing dns petitions through bash script that check a custom whitelist with preg_match and just block if there is not coincidence at I supposed it is done now with blacklist.

Regards.

Pi-hole blocks on a domain basis. We don’t know the paths the browser wants to visit.

1 Like

In your example, the protocol is https, the domain is estaticos.laprovincia.es, and everything after the domain is the URL path.

But if we are doing it in the blacklist we can do the same with a whitelist in order to prevent anti adblocking systems.

I know it.

I’m not clear on how your requested feature would work. Can you walk us through a specific example that would show what you want Pi-Hole to do?

As I explained before the idea is to add to white list an absolute path and not basis on a domain name. So the feature request its to give the same possibilities as in the blacklist option (in the admin panel) to the whitelist because we need to know which file exactly is the script that is trying to detect the adverts but it does not add adverts its just for detecting.

Pi-hole doesn’t know paths. When you go to https://this.site/thispage/advert.gif the only thing Pi-hole knows is that you went to this.site. That’s it.