Pi-hole is a DNS sinkhole, sometimes called black hole DNS. When a device asks it for a blocked hostname, Pi-hole sends a blocking reply in place of the usual address. That can stop ads and trackers with their own listed hostname. Ads can still load from an allowed content hostname, a literal IP address, or an app that resolves the name through another DNS service.
| What the app does | Does Pi-hole see a lookup? | What Pi-hole can block |
|---|---|---|
| Looks up a listed ad or tracker hostname through Pi-hole | Yes | The hostname, if the list or rule applies to that client. |
| Looks up a hostname shared by ads and content through Pi-hole | Yes | The whole hostname. Blocking it can break the content too. |
| Connects to a literal IP address | No lookup is needed for that connection. | DNS filtering cannot stop the connection. |
| Sends DNS directly to another resolver | No, for that lookup. | Pi-hole’s rules cannot apply to that lookup. |
Blocking happens at the name, not the content
A DNS request asks for a name. If a video and its ad use the same hostname with different URL paths, Pi-hole can see the name but has no way to distinguish the two requests. Raspberry Pi’s guide to Pi-hole
In the default NULL blocking mode, Pi-hole answers a blocked A query with 0.0.0.0 and a blocked AAAA query with ::. Other modes can return NXDOMAIN or a reply without address records. Compare the log status with the configured blocking mode when interpreting an answer. Pi-hole blocking modes
Black hole DNS, null routes and DNSBLs are different things
A DNS sinkhole acts on name lookups. A null route discards packets based on the destination IP, even if the client already knows that address. A DNS-based blocklist, or DNSBL, publishes entries that services such as mail servers can consult when deciding whether to accept a connection. RFC 7999 · RFC 5782
Every client must actually use it
Advertise Pi-hole as the client’s DNS resolver through your router, or let Pi-hole serve DHCP itself if your router cannot advertise a custom resolver. You can also point a single device at Pi-hole to check its behavior. Pi-hole post-install guide
Why DoH and DoT can bypass Pi-hole
DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt the trip to the chosen DNS resolver. An app that sends queries to a public encrypted resolver directly keeps those lookups outside Pi-hole. Pi-hole still applies its local rules when the client queries Pi-hole first and Pi-hole forwards allowed queries to an upstream DNS proxy. RFC 8484 · RFC 7858 · Pi-hole resolution flow
Enforce Pi-hole use on clients you manage
Check the DNS settings in the app as well as on the device. Firefox’s Off setting for DNS over HTTPS uses the default resolver. On managed Firefox installations, the DNSOverHTTPS policy can control and lock that choice. Mozilla’s canary signal applies to automatic DoH and can be overridden by a user who enables DoH. Firefox DoH settings · Firefox administrator policy · Mozilla’s canary documentation
Firewall enforcement has a defined scope
A rule that limits ordinary DNS on TCP and UDP port 53 leaves DoT and DoH outside its scope. Check the app’s resolver settings before assuming a port 53 rule covers its DNS traffic. Netgate DNS recipe · RFC 7858 · RFC 8484
Include routed clients and IPv6
Pi-hole’s default listening mode accepts queries from locally attached subnets. For a client on a routed subnet, check the listener and firewall together before broadening access. Check each IPv4 and IPv6 DNS server the client received. An AAAA lookup tests the requested record type and can travel over IPv4. Pi-hole interface settings · Pi-hole’s resolver check
Verify the policy one client at a time
Use one client and one hostname, and note the time of each lookup. In this illustrative case, the client’s subscribed list includes api.mixpanel.com, and Pi-hole uses NULL mode. Substitute a hostname on a list assigned to your client. Pi-hole’s resolver check
-
Send a fresh lookup from the client. Open Pi-hole’s Query Log, then run these commands on the client. Replace
PIHOLE_IPwith the resolver’s address. BIND’s dig manualdig @PIHOLE_IP api.mixpanel.com A dig @PIHOLE_IP api.mixpanel.com AAAA -
Match the client and name. Look for new rows with the client’s IP or hostname and
api.mixpanel.com. A subscribed-list match appears as Blocked (gravity). Compare the A answer, expected to be0.0.0.0, and the AAAA answer, expected to be::. If the query arrived but stayed allowed, check the client’s group and assigned lists. Query Log labels · FTL status table · Pi-hole blocking modes · Per-client blocking examples -
Repeat the app action. The commands above deliberately target Pi-hole. To check the app’s own DNS path, open the site or repeat the action that requests the hostname. A fresh entry for that client and hostname at the time of the action shows that the lookup reached Pi-hole. Pi-hole’s resolver check · Query Log source
If the app’s lookup is missing, retry after its cached DNS answer expires. Check whether the privacy level hides the domain or client or disables the Query Log. If using pihole tail on the Pi-hole host to watch traffic live, check that dns.queryLogging is enabled. Finally, check the resolver the device received and the app’s secure DNS setting. RFC 1035 · Pi-hole privacy levels · Pi-hole command reference · FTL configuration · Firefox DoH settings
For a fuller diagnosis, see Pi-hole not blocking ads.
Upstream resolution is a separate decision
Pi-hole forwards allowed queries it cannot answer locally to an upstream resolver. With a local Unbound recursive resolver, that service contacts the DNS hierarchy directly. In either setup, the client has to send its lookup through Pi-hole for local filtering. Pi-hole’s Unbound guide
For differences in filtering and encrypted DNS support, see Pi-hole vs AdGuard Home.
What does “Blocked (external, NXRA)” mean in Pi-hole?
Blocked (external, NXRA) means Pi-hole’s DNS engine, FTL, classified an upstream reply as a block because it returned NXDOMAIN with the Recursion Available (RA) flag unset. NXDOMAIN normally signals a missing name. RA indicates whether a server offers recursion. To establish why the resolver sent it, check the provider’s policy for the name. FTL status table · RFC 1035
| Query Log status | FTL ID | Why FTL assigned it |
|---|---|---|
| Blocked (gravity) | 1 | The domain matched a subscribed list in Pi-hole’s gravity database. |
| Blocked (regex) | 4 | The domain matched a local regular-expression deny rule. |
| Blocked (exact) | 5 | The domain matched a local exact deny rule. |
| Blocked (external, IP) | 6 | The upstream replied with a known block-page address. |
| Blocked (external, NULL) | 7 | The upstream replied with 0.0.0.0 or ::. |
| Blocked (external, NXRA) | 8 | The upstream replied with NXDOMAIN and no RA flag. |
| Blocked (external, EDE15) | 18 | The upstream returned Extended DNS Error 15, meaning Blocked. |
FTL status table · Query Log labels · RFC 8914
Trace and fix an NXRA block
- Read the status before changing lists. Match the query to the table. NXRA points to the upstream response, so resolve it at the upstream. The Query Log has no Allow action for that status, and a local allow rule cannot change the upstream’s answer. Query Log source
- Check the configured upstreams. Look up
dns.upstreamsin the Pi-hole configuration. From the Pi-hole host, query each listed resolver withdig @UPSTREAM_IP HOSTNAME A. Substitute the resolver address and the logged name and record type. Use-p PORTfor a custom port. Look forstatus: NXDOMAINand check whetherraappears on the flags line. FTL configuration · BIND’s dig manual - Confirm the policy. Quad9’s FAQ shows
dig @9.9.9.9 isitblocked.orgreturning NXDOMAIN withoutrafor its blocked test name. Its nonexistent-name example also returns NXDOMAIN, withrapresent. For Quad9, check the name with its Blocked Domain Tester. If unrelated, known-good names show the same pattern, check the upstream’s configuration or service before treating the replies as deliberate blocks. Quad9 FAQ - Retest after an upstream change. If the service is filtering, address the block through the provider or choose a resolver with the policy you want. Quad9’s service at
9.9.9.10omits its upstream threat blocking. After a change, allow the cached block to expire or runpihole reloaddnson the Pi-hole host to flush its DNS cache. Then repeat the client lookup. Quad9 services · FTL cache configuration · Pi-hole command reference
To set up the DNS sinkhole on a Raspberry Pi, use the Raspberry Pi setup guide.
Lists, breakage and diagnosis
If a site breaks and the Query Log shows a local block for a name the site requires, review that client’s group before making an exception. A group-specific exception limits the change to the intended clients. Pi-hole’s per-client blocking examples
Availability
Clients that rely on a single Pi-hole for DNS can lose name resolution when that resolver goes offline. For host sizing, see the Pi-hole hardware requirements and memory and blocklist sizer.
Evidence and limits. The behavior is documented in the Pi-hole v6 FTL blocking and status references. The Query Log labels come from Pi-hole Web v6.4.1. The client case is illustrative, and the steps were not run for this article.