Inconsistent ip address resolution with local DNS provisioning

In pihole I provisioned the FQDN of a device on my local network with its local static ip address using the "Local DNS" page under the "Tools" menu. The provisioning succeeded. I see the provisioned key-value pair in /etc/pihole/custom.list. I then flushed the cache and restarted DNS. In /var/log/pihole.log, I see the resolver sometimes using custom.list to retrieve the desired ip address, but sometimes it forwards the request to the upstream server(s). In the "Query Log" of the web interface I see the requests for the local device going to the upstream servers. The requests come from multiple clients on my network.

Debug token
(The local device is "")

Expected Behaviour:

Resolution should default to local DNS first, and iff that fails go to upstream

Details about my system:
Linux pihole 5.10.63-v7+ #1488 SMP Thu Nov 18 16:14:44 GMT 2021 armv7l GNU/Linux


Sorry, your debug log expired. Please create a new one.

Done. Thanks for looking!

-rw-r--r-- 1 root root 63 Jan 11 10:51 /etc/pihole/custom.list

   Jan 14 08:38:33 dnsmasq[12398]: query[A] from
   Jan 14 08:38:33 dnsmasq[12398]: /etc/pihole/custom.list is
   Jan 14 08:38:33 dnsmasq[12398]: query[AAAA] from
   Jan 14 08:38:33 dnsmasq[12398]: forwarded to

With custom.list you create a A record. However, your clients request an AAAA record, which your Pi-hole can't answer from custom.list that why it gets forwarded upstream.

Ah thanks! How could I prevent this? The local device does not have an IPv6 address assigned to it.

You could create a blacklist regex filtering only this request as an AAAA type.;querytype=AAAA

Looks like that works. I now see the AAAA requests blocked