Think of a Pi-hole exception as an instruction with three parts: which names it matches, which clients it applies to, and where it sits in the rule order. An exact allow can be perfectly written and still miss the affected device’s group; a broad allow can fix the dashboard while admitting hosts you never meant to trust. Keeping those three parts separate makes a blank page much easier to investigate.
The path below starts with the Query Log, where Pi-hole records the name, client and DNS result. It then moves from an exact allow to a wildcard, which includes a domain’s subtree, and finally to a regular expression (regex), which describes a matching pattern. The .example names are illustrations, not a list of domains to trust. Substitute the dependencies your own log shows.
Separate a rule’s scope from its priority
Pi-hole's domain database documentation[1] gives this current priority order:
- Exact allowlist entries.
- Regex allowlist entries.
- Exact denylist entries.
- Subscribed allowlists.
- Subscribed denylists.
- Regex denylist entries.
Read the list from the top: the first applicable match decides whether that name is allowed or denied. A wildcard is a way to describe scope, not a separate priority level. Pi-hole’s CLI[2] supports both --allow-wild and --wild; its implementation[3] converts them into regex allow and deny entries. The client’s group still matters. A matching rule outside that client’s groups is not a competing rule for its query.
Pi-hole blocks by answering a DNS query according to its configured blocking mode. Its configuration reference[4] lists NULL as the default, which answers with 0.0.0.0 or ::; NXDOMAIN and other modes are available. The routine behavior is not to return the address of Pi-hole's web interface. An allowlist decision permits DNS resolution, but it cannot repair an unrelated HTTP, TLS or application problem.
Find the domain before allowing it
Open Pi-hole's Query Log, reproduce the failure on one device, and filter to that client and time. Check that your privacy setting exposes the relevant domains and clients; Pi-hole can hide those details or disable the Query Log. Note each blocked domain and its status. A page can depend on separate names for scripts, images or an API, so the address-bar host may resolve while the dashboard remains blank. An allowed query is a reason to keep looking for another failed dependency, rather than adding the same name to the allowlist again. If no relevant query appears, verify the client's configured resolver, cache, VPN and encrypted-DNS path before changing Pi-hole lists.
Use the log and list search for different questions. The log records what Pi-hole saw from the client, while pihole query example.com on the host searches configured lists for that name, as the CLI reference[2] describes. Together they give you a reason to test a particular exception. Reproduce the page afterward to establish whether that DNS decision was causing the failure.
Check group membership if one device fails and another succeeds. Pi-hole's group management guide[5] allows lists and domain entries to apply to selected clients. A new CLI allow entry joins the Default group unless reassigned under Group Management → Domains, according to the allowlist guide[6]. If your affected client is not in that group, assign the entry to the group it actually uses.
First choice: an exact allow entry
If the blocked name is assets.shop.example, allow that name. In the current Pi-hole admin interface, add an exact allow domain under Group Management → Domains, or on the Pi-hole host use:
pihole allow assets.shop.example
The command guide[6] says this adds the domain and reloads FTL. An exact entry for assets.shop.example does not include shop.example or ads.shop.example. That narrowness is a benefit when only one needed asset host is blocked. Reproduce the page request, look for a new allowed query from the same client, and remove the entry if the page still fails. A cached answer on the device can delay the visible change; ask the client for a fresh query or clear its cache before deciding the rule did nothing.
An exact allow has the highest published priority, so it can override a lower-priority manual or subscribed deny for the same name when the group assignment applies. That tells you which DNS decision should win, without establishing that the content is safe or that the page will be ad-free. Give the exception a name and review point so its purpose remains clear later.
Wildcard allow: a deliberate subtree exception
If the log shows a rotating family such as a1.cdn.shop.example and b2.cdn.shop.example, allowing names one by one may be impractical. The current CLI provides a wildcard allow command:
pihole --allow-wild cdn.shop.example
The wildcard command creates a regex that includes the base name and its subdomains. For this example, that means both cdn.shop.example and a1.cdn.shop.example; it is broader than the exact asset entry. Verify the base and observed children on your installation before keeping it. Future matching subdomains receive the same exception, so choose a narrow parent such as cdn.shop.example rather than opening all of shop.example.
When the cause is your own overbroad wildcard deny, inspect and narrow that entry first. An exact or suitably scoped allow may also preserve the value of a subscribed list without removing the whole subscription for one domain. Whichever route you take, document the dependency and the reason for the exception so a later cleanup does not recreate the failure.
Regex allow: use when a pattern adds real precision
Pi-hole's regex tutorial[7] uses POSIX extended syntax with Pi-hole extensions. Dots need escaping when they mean literal DNS separators, and anchors prevent accidental partial matches. To allow a base name and every subdomain of an illustrative example, this pattern is specific:
(^|\.)cdn\.shop\.example$
(^|\.) requires either the start of the name or a dot before cdn; \. matches a literal dot; $ anchors the end. That should match cdn.shop.example and a1.cdn.shop.example, but not badcdn.shop.example or cdn.shop.example.evil.test. These are expected matches for the example pattern, not evidence that a real store uses those hosts. This pattern expresses the same subtree as the wildcard command; it is useful for learning the boundary, not a reason to replace a working wildcard with handwritten regex.
Test before saving. The official FTL regex test mode[8] accepts a domain and a proposed pattern:
pihole-FTL regex-test 'cdn.shop.example' '(^|\.)cdn\.shop\.example$'
pihole-FTL regex-test 'a1.cdn.shop.example' '(^|\.)cdn\.shop\.example$'
pihole-FTL regex-test 'badcdn.shop.example' '(^|\.)cdn\.shop\.example$'
The first two should match and the third should not. Also try cdn.shop.example.evil.test as a negative case; an end anchor is easiest to understand when you see what it excludes. Pi-hole documents exit code 0 for a match and 2 for no match; inspect the printed result as well. When you have a pattern you trust, add it as a regex allow entry in Group Management → Domains or use the documented pihole --allow-regex form. Keep the literal shell quotes so backslashes reach the regex engine unchanged. An allow regex takes priority over exact and regex denies in the published hierarchy; its breadth deserves the same care as a wildcard allow.
Do not build a giant alternation for several unrelated top-level domains until you have real blocked names in the log. An exact entry or a couple of narrow patterns are easier to audit. Pi-hole's regex documentation[9] says regex matches are cached after a domain is checked and describes pihole reloadlists when filters change. If performance is a concern, measure the resolver under your own workload before changing the patterns.
Worked example: a missing dashboard asset
Suppose one device’s log shows portal.shop.example allowed but assets.cdn.shop.example blocked. Draw the dependency in words: the browser can find the portal, but the portal asks it to fetch an asset from a second name. Add an exact allow for the blocked asset, reload the dashboard and look for a fresh allowed query from that same device. If the dashboard now works, you have linked a particular exception to a particular failure; stop before widening it.
Now extend the example: a later page load requests b7.cdn.shop.example, followed by c9.cdn.shop.example. Those observations suggest a variable subtree. Compare the names and choose the narrowest parent that contains only the assets you intend to trust. Try a wildcard allow for cdn.shop.example, then test the observed names and at least one name you want excluded. Use the regex pattern only if it expresses a boundary the wildcard cannot express, such as two specific prefixes. In each case, ensure the entry applies to the affected client's group.
If ads.cdn.shop.example begins loading as well, the subtree exception is admitting more than the original assets. Decide whether that tradeoff is acceptable. You can remove the broad allow and return to exact entries or a tighter regex, then retest the dashboard. Keep the compromise visible in a name or comment rather than treating every CDN referenced by a bank or store as inherently trustworthy.
When the visible name is not the blocked name
Read the full log around the failure rather than relying on the address bar. Pi-hole's query-status documentation[10] includes blocks during deep CNAME inspection: a name can resolve through an alias whose target is on a denylist. If the query status points to that path, write down both the requested name and the blocking target before choosing an exception. A broad allow for the entire site may hide the symptom while admitting many unrelated names. Reproduce one fresh lookup and see which status changed after your narrow allow.
Also distinguish a subscribed allowlist from an exact manual allow. Pi-hole v6 supports subscribed allowlists, and its priority list[1] puts them below exact denylists but above subscribed denylists. If a manually denied name still fails despite a subscription that includes it, the exact deny has higher priority. Diagnose that conflict directly; do not add a regex just because one list entry failed to win. Check the affected client's group assignments before comparing two rules that might never apply to the same client.
Quick choice and rollback
| What the log shows | Start with | Recheck |
|---|---|---|
| One blocked FQDN | Exact allow | Same client, same name, fresh query |
| Several changing names under one narrow parent | Wildcard allow | Base, observed children and an unwanted sibling |
| A specific pattern across names | Regex allow | Matching and nonmatching test names |
| Manual wildcard deny is too broad | Narrow or remove that deny | Previously blocked and intentionally blocked names |
| No matching query in Pi-hole | Inspect client DNS path | Resolver address, cache, VPN and secure DNS |
Remove a test entry under Group Management → Domains or use the corresponding CLI removal syntax when it fails to help. The allowlist guide[6] documents pihole allow remove DOMAIN for exact entries; check the help for your installed wildcard or regex command before deleting those. Retest the same client after rollback. Keep only exceptions tied to an observed dependency, and revisit them when the service changes.
Work from one observed failure through one narrow change, then check both the new query and the page. Pi-hole’s priority order gives you a predictable DNS decision; the application still has to demonstrate that the decision solved its problem. Roll back exceptions that add access without helping, and retain the ones whose purpose you can explain.