PiHoleHQ
Flat isometric illustration of a pink shield holding a cylinder, with arrows linking a white server block and a laptop showing a warning icon.
troubleshooting

Pi-hole Not Blocking Ads: How to Diagnose It

Find out why Pi-hole is not blocking ads. Check whether your device uses Pi-hole, then trace IPv6, encrypted DNS, blocklists, and group rules.

By PiHoleHQ Editorial · ·Updated · 5 min read

If Pi-hole is not blocking ads, run pihole status to check that DNS and blocking are active, then use pihole tail while reproducing the problem. When queries are missing, check the device’s DNS settings. When the ad hostname reaches Pi-hole, check the lists and group rules that apply to that device. Pi-hole command reference

Check whether blocking is enabled

On the Pi-hole host, run the status check. Pi-hole command reference

pihole status

If DNS is running and blocking is disabled, run pihole enable to turn blocking back on. Pi-hole command reference

If DNS is down, restore the service before checking blocklists. Start with the host’s static address, supported operating system, and required ports. Pi-hole prerequisites · Pi-hole hardware requirements

Watch for queries from the affected device

pihole tail

With query logging enabled, leave this running on the Pi-hole host while you reload the affected page or retry the app. If you see the relevant hostname, go to Check the domain and the client’s groups. If you see no matching query, run a lookup from the affected device to check its DNS path. Pi-hole command reference

On Windows, the first lookup uses the client’s default DNS server. The second directs the same lookup to Pi-hole. Replace 192.168.1.42 with your Pi-hole’s address and run one lookup at a time while you watch the log. Microsoft nslookup reference

nslookup example.com
nslookup example.com 192.168.1.42

If only the direct lookup reaches Pi-hole, check the DNS servers assigned to the device. If neither reaches Pi-hole, check whether the client can reach the Pi-hole host. If the router forwards DNS to Pi-hole on the device’s behalf, the requests can appear under the router’s address. Microsoft DNS client troubleshooting · Pi-hole Fritz!Box DNS guide

Check DHCP and IPv6 DNS

On Windows, run ipconfig /all and read DNS Servers under the active adapter. Check every listed IPv4 and IPv6 address. If a public resolver is listed alongside Pi-hole and you want every lookup filtered, remove that resolver from the settings handed to clients. Microsoft DNS client troubleshooting · Pi-hole post-install guide

Set Pi-hole as the DNS server in the router’s DHCP settings. If the router cannot advertise a custom resolver, the documented alternatives are to set DNS on each device or use Pi-hole’s DHCP server. Turn off the router’s DHCP server before enabling Pi-hole’s. Pi-hole post-install guide

Check the router’s IPv6 DNS settings separately. For example, on a Fritz!Box, open Home Network → Network → Network Settings → IP Addresses → IPv6 Addresses → DNSv6 Server in the Home Network. Set Local DNSv6 server to Pi-hole’s stable IPv6 address and enable its router advertisement option. Recheck the client’s assigned servers after changing the settings. Pi-hole Fritz!Box IPv6 instructions

Check for hardcoded or encrypted DNS

If the default lookup reaches Pi-hole but the app never sends the hostname there, check the app’s DNS settings. Some devices and apps have a hardcoded resolver. Blocking access to that resolver can break the app or device. Pi-hole Fritz!Box guide

A device or browser can send queries directly to an external encrypted resolver. DNS over HTTPS uses HTTPS, and DNS over TLS defaults to TCP port 853. Discovery of Designated Resolvers lets a client discover an encrypted resolver designated by its existing resolver. RFC 8484 · RFC 7858 · RFC 9462

In Firefox, open Settings → Privacy & Security → DNS over HTTPS → Advanced settings. Choose Off to use the default resolver, then retry while watching pihole tail. Firefox DNS over HTTPS settings

For another way to handle encrypted DNS on your network, see Pi-hole vs AdGuard Home.

Refresh Gravity

If subscribed lists may be out of date, run this on the Pi-hole host. Gravity fetches subscribed lists as needed, merges their entries into the Gravity database, and reloads DNS. Check the specific hostname after the refresh. Pi-hole command reference

pihole -g

Check the domain and the client’s groups

Replace ads.example.com with the hostname from the live log. The query searches Pi-hole’s allowlists, denylists, wildcard rules, and subscribed lists. Pi-hole command reference

pihole -q ads.example.com
  • No blocking entry matches. If you’ve confirmed the hostname serves ads and can be blocked without breaking the site or app, add it with pihole deny ads.example.com. New entries apply to the Default group. For a different group, change the assignment under Group Management → Domains. Pi-hole allowlist and denylist guide
  • A blocking entry matches. Compare the device’s group memberships with the groups assigned to the matching list or rule. Pi-hole’s example shows a client that stops using the default lists when its Default membership is removed. Check any enabled allow rule that applies to that device. Pi-hole Group Management examples

When both an allow and a deny entry match, exact and regex allow rules take priority over exact deny rules. An exact deny rule takes priority over a subscribed allowlist. Pi-hole rule priorities

After making a change, query Pi-hole directly from the same client, using your Pi-hole’s address in place of the example address.

nslookup ads.example.com 192.168.1.42

In Pi-hole’s default NULL blocking mode, the answer for a blocked hostname is 0.0.0.0 or ::. Compare the result with the response documented for your configured blocking mode. Microsoft nslookup reference · Pi-hole blocking modes

Clear cached answers and retry

If the direct lookup shows the expected block but the app still loads the hostname, clear the client’s DNS cache and retry. On Windows, run the following command. nslookup bypasses the Windows client cache, so use the affected app to check whether clearing the cache helped. Microsoft DNS client troubleshooting

ipconfig /flushdns

Recognize the limits of DNS blocking

Pi-hole applies rules to hostnames. If a site or app serves the ad and the content from the same hostname, blocking that hostname affects both. Pi-hole domain database

Pi-hole can inspect a CNAME chain and block the query if a target in that chain matches a block rule. Its query database records the target that caused the block. Pi-hole query database

See what a Pi-hole DNS sinkhole can and cannot block for examples.

Restore a site that broke after a list change

Run pihole tail, reproduce the failure, and check the suspected hostname with pihole -q required.example.com, using the actual hostname. If you’ve confirmed Pi-hole is blocking a hostname the service needs, run pihole allow required.example.com with that hostname. Assign it to the affected group and retry the service. Pi-hole command reference · Pi-hole allowlist and denylist guide

If you’re planning a larger list configuration, use the memory and blocklist sizer to estimate resource needs.

Collect a debug log for persistent problems

pihole debug

The debugger looks for known problems and can link to guidance. Review the generated log before choosing whether to upload it to the Pi-hole developers. Pi-hole command reference

Evidence and limits. The steps are based on the Pi-hole v6 documentation, Microsoft and Mozilla support documentation, and the cited DNS standards. The commands were not run on a Pi-hole installation for this guide.

Sources

  1. Pi-hole documentation: The pihole command
  2. Pi-hole documentation: Prerequisites
  3. Microsoft Learn: Troubleshooting DNS clients
  4. Microsoft Learn: nslookup
  5. Pi-hole documentation: Post-install
  6. Pi-hole documentation: Fritz!Box
  7. RFC 8484: DNS Queries over HTTPS (DoH)
  8. RFC 7858: DNS over Transport Layer Security (DoT)
  9. RFC 9462: Discovery of Designated Resolvers
  10. Firefox Help: Configure DNS over HTTPS protection levels
  11. Pi-hole documentation: Blocking mode
  12. Pi-hole documentation: Domain database
  13. Pi-hole documentation: Group Management examples
  14. Pi-hole documentation: Allowlist and Denylist editing
  15. Pi-hole documentation: Query database

Related