Pi-hole not blocking ads on Unifi Network


Hello! I’ve recently installed Pi-hole on a Raspbery Pi 3B+ and added it to my Ubiquiti Unifi network. After getting it up and running following this guide, the Pi-hole successfully blocked ads as expected for about a day. My Unifi devices (USG-PRO, 8-port 150W Switch, CloudKey)
are all using static IPs except for my AP-PRO, which is DHCP. The Raspbery Pi has a static IP as well.

I’m not quite sure where I’m going wrong. All of my devices show that they are using the Pi-hole’s IP as the DNS, and the Pi-hole admin console looks like it’s working.

Expected Behaviour:

Pi-hole should be blocking ads.

Actual Behaviour:

Pi-hole is not blocking ads.

Debug Token:



More than likely what is happeneing here is your devices have a local DNS cache and that is what is causing ads.

You can wait an hour or clear said local cache manually


Thanks for the reply. How would I go about clearing the cache manually?


Your debug log shows your Pi-Hole is working properly. The bits of the pihole.log included in the debug log shows it is receiving and replying to DNS queries from some clients …100.8 and …100.9.

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] affiliate-robot.com is via localhost (
[✓] affiliate-robot.com is via Pi-hole (
[✓] doubleclick.com is via a remote, public DNS server (

Testing steps:

  1. Assign a client DNS directly to the Pi-Hole static IP. Clear the DNS caches on that client and see if Pi-Hole is seeing the traffic from that client (easiest way is to tail the pihole.log).

  2. You have both OpenDNS and your router assigned as upstream DNS servers in Pi-Hole. Remove the router and just use OpenDNS.

    *** [ DIAGNOSING ]: Setup variables


  3. Take a careful look through all the router settings (all the tabs). Look for WAN DNS, LAN DNS, DNS rebinding, DDNS, DNS caching, family friendly options, etc. There may be a setting that provides a bypass around the Pi-Hole.