Block everything, allow whitelisted only!

Is there a way to block everything and allow whitelisted domains only?

PS: I can achieve it by supplying a null-DNS to pihole & adding followings to 01-pihole.conf ( but not through UI )

To allow google & twitter but block everything else.



1 Like

Another method - which is supported through the web interface - is adding a regex filter that will match anything, maybe as simple as


and then selectively whitelist the domains you want, also though the UI.

Cool - the regex should be ".*" to block-all; but how to whitelist * & *

Don't want to manage all deeper level of domains in whitelist like

In Pi-Hole (current version pre-V5) you cannot whitelist wildcards. Only exact domains can be whitelisted.

The reason for this is that whitelisting a domain makes it "gravity proof". When gravity is updated, a list of domains is created from your subscribed blocklists. These are sorted, duplicates removed, and then all the domains in your whitelist are removed from gravity.

Since gravity is a list of single domains, the whitelist is the same.

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