Conditional Whitelisting?



Would it be possible to white list ad-providers when they are requested coming from a specific domain? I would like to support a site that uses adds, but block the very same ad-providers for all other sites…

For instance:

The nice website ‘’, which I would like to support, would like me to whitelist:

Which pretty much stops Pi-hole from working I assume for other sites as well?!?

So, would it be possible to allow that list, ONLY if the requests came from * but if the request came from any other website, it’d get blocked???

Thanks for your thoughts



No, this is not possible as we do not get this “request came from …” information


Hmmm… Too bad… Would be an interesting thing maybe (but complex?) to have (Merlin like) routers do packet sniffing and extract such information, say as an agent in a network? or even an agent on running on a client itself…

Just rambling :wink:


The closest you could probably get to what you seem to be after is running uMatrix, or uBlock-origin (in “hard mode”), in your browser. It’s not a network-wide DNS-based solution. You’d need to have any of the domains you might want whitelisted by your Pi-hole, then use uMatrix/uBlock-origin to allow or disallow the requests on a site-by site basis, before your browser makes them. It can be really time consuming to get everything set up for a particular site, but once it’s running it just does its thing. Not for the faint of heart or those who don’t tolerate/enjoy endless tinkering to get websites running just how they want.


I did this only twice so far, but my way of showing appreciation for free website is very much different:

Instead of wasting a few hours of trying hard to find a way of getting ads displayed on website xyz, I usually contact the responsible person for the content and send them $2 by either mail (preferred) or PayPal.

Just think about:

  • the amount of time you waste with trying to build a super-complex circumvention method,
  • the added annoyance of seeing ads everywhere on these pages afterwards,
  • and the little reward a web content provider will actually get from the few dozens ads that are shown to you.

IMHO sending $2 (or more) in a letter seems to be advantageous for both parties.


I know, and you do have a good point to be honest…

I keep telling them, why not host the ads yourself then, then it is easy for my to whitelist them, but whitelisting googleadservice and doubleclick I might as well shutdown my Pi-Hole…

Thanks for your considerations RobGill and DL6ER… I think they simply should put a Paypal button on their website :wink:


whoa, not for the faint of heart indeed… I’d like to support them, not spend my life for them :wink: