Localhost Querying Pihole domain?

I do, is that what is causing this?

It could be. Conditional forwarding generates additional traffic between the router and Pi-Hole. Disable conditional forwarding for a bit and see if the behavior changes.

2019-01-03 15:57:10 A pihole localhost OK (cached) IP (0.1ms) Blacklist
2019-01-03 15:57:10 AAAA pihole localhost Unknown N/A
2019-01-03 15:57:08 A pihole localhost OK (cached) IP Blacklist
2019-01-03 15:57:08 AAAA pihole localhost Unknown N/A
2019-01-03 15:57:06 A pihole localhost OK (cached) IP Blacklist
2019-01-03 15:57:06 AAAA pihole localhost Unknown N/A
2019-01-03 15:57:03 A pihole localhost OK (cached) IP Blacklist
2019-01-03 15:57:03 AAAA pihole localhost Unknown N/A


This is weird i have even gone in and tried setting ttl for auth and local for dnsmasq to something that will make it cache it longer in hoping it would quit asking but it just keeps on going.

Setting a longer TTL won't make the device stop asking for the address, it will just extend the time that the answer is retained in cache.

What other software is running on the Pi in addition to Pi-Hole?

What version of Pi-Hole are you running?

I was hoping it would force the DNS client to realize that the ttl is X amount of time so quit asking :slight_smile:

PiHole 4.1.1

Running the latest version of PiVPN as well.

Please run a debug log and upload the token so we can look at your configuration for any problems.

Just now seeing this in the morning, I am no longer seeing these entries at such a rapid frequency, i made a couple of changes yesterday.

Changed local-ttl to 3600 like all of my other ttl settings for dnsmasq and i also knocked off the network my MiRobot vacuum which was polling the amazon instance every 2 seconds (hence the reason for me getting into dnsmasq/ttl configs in the first place) and my recent Denon 740H reciever that was querying for the full 32 bits of the local subnets reverse DNS zone every 5 seconds.

Taking these both offline and making the ttl changes has stopped all of the white noise on my install and I am going to run with this moving forward.

Hopefully this provides some information for anyone else that might see this problem.

If you would still like a debug session let me know, never done one.

Send us the token generated by

pihole -d

or do it through the Web interface:


Your debug log doesn't show any problems. The section pasted below is where Pi-Hole is tested using the loopback and LAN-facing IP's, and then with a third party DNS bypassing Pi-Hole. You should see success on all of these in a properly functioning Pi-Hole:

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

Thanks @jfb for taking to time to check everything out, I really think it was some device on my LAN causing the issue.

I was able to finally resolve this issue by changing the hosts files line for localhost to match the hostname entry as mentioned in this article


Since the default build uses the hostname file and puts in PiHole you have to edit the first line of the hosts file from localhost to pihole and then OS quits trying to resolve pihole.

Probably wasn't eating up too many resources but i hate little inefficiencies like this.

1 Like

This also worked for me tooo THanks!

Last night (02/15/2022) one of my piholes was updated to v5.9 FTL v5.14 and web interface v5.11 and since then dnsmasq was flooded with A and AAAA queries for the host name, one per second!
After searching I found this page and applying this fix resolved my problem!
Writing this comment so that if others run in to it after an update they can give this a shot.

1 Like

This fixed it for me too. My hosts file looks like this on ubuntu 20.04.3 Server:

I only changed: " localhost" to " ubuntu". Fixed it immediately.

===========START============ ubuntu

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Above line is necessary for the the localhost name to resolve to IPv4
Dont change that one!

Below how is done for Pi-OS/Debian etc:

1 Like

Haha yeah, I put that back in a few minutes ago lol. DUHHH haha