Can't hide localhost in dashboard

The issue I am facing: localhost [pi.hole] is displayed in dashboard although "IGNORE_LOCALHOST=yes" is in "pihole-FTL.conf".

Details about my system: Pi-Hole v5.15.5 / FTL v5.21 on a Debian System with PHP 8.1 and Apache2

What I have changed since installing Pi-hole: is that important?


I have installed a fresh PiHole on my Debian server. PiHole is not the only thing running on the server. Among other things, I have an Uptime Bot on it. This pings every 60 seconds +-10 websites. All these pings are of course displayed in the PiHole, and because there are so many of them, it blows up the statistics and the graphs.

A few internet searches later I came across a post that told me to add "IGNORE_LOCALHOST=yes" to the "pihole-FTL.conf" file. I did that and restarted the whole server. In the FTL console I see that this wants to hide the ["IGNORE_LOCALHOST: Hide queries from localhost" in /var/log/pihole-FTL.log], but the domains that are called up are still visible in the top domains list. Under Top clients the pi.hole entry has disappeared. In the query log, however, you can still see the calls from the server.

How can I ban localhost aka pi.hole from the entire dashboard? I don't think it matters if the traffic from the server goes through the PiHole. So a DNS change only for the server is theoretically possible.

PS: You can answer in German, but English is of course also possible :wink:

Could you share a screenshot of the dashboard and the query log highlighting your issue?

.+ all domains in the top domain list are from localhost/pi.hole. I don't want to see domains from localhost on the dashboard + query log.

Is that helpful?

Change /etc/resolv.conf and set the Pi-hole server to use an external DNS server, not itself.

That's only the query log - the dashboard would have been helpul, too.

But not seeing any localhost entries, it would seem that IGNORE_LOCALHOST is working.

If you wouldn't want to see pi.hole as well, you could consider Dan's suggestion.
Or you could consider to configure your uptime bot to ping by IP, avoiding the DNS lookup. Of course, that may only be feasible for fairly static IPs, e.g. when using instead of

I changed the DNS server in /etc/resolv.conf, but when I restart the server it resets to the PiHole IP.

set the Pi-hole server to use an external DNS server, not itself.

what do you mean? how do i do that?

Yes, I don't see localhost either. But the PiHole is on the same server, so I thought localhost and Pihole were the same.
I don't have a problem with localhost, it's not shown to me, but pi.hole is shown, and so are all the pings.
I thought "IGNORE_LOCALHOST" works for localhost AND pi.hole because it comes from the same server.

And I researched. A DNS change on the part of the uptime robot is not possible, unfortunately.

Then you'll need to follow the hints in /etc/resolv.conf on how to make that change stick.

Change /etc/resolv.conf to use a DNS server that isn't Pi-hole.

i have no information in the file about how to keep the settings...
this is my file, the censored one is the pihole-ip that resets after a reboot..

does anyone else have any ideas?

Commonly, the tool governing changes to `resolv.conf` would write some respective information to that file.

Here are some examples

# Generated by NetworkManager
# Generated by resolvconf

As that is missing, I cannot know what network management tool your system would be using. You'd have to consult your OS documentation and support for details.

It would depend on your Linux distro, possibly its release and its configured network management tool how you'd go about persisting your changes to your system's DNS resolver.

You state you are running Debian, which may mean that you've opted for a certain set of networking packages when building your system. Remembering those may serve as a starting point for your search.

Also, did you consider:

I found something a few hours ago:

I had the same problem. It was soved by installing the resolvconf package. Since I am on Debian I can not test, but may help this tip:

  1. open (or create) as sudo: /etc/dhcp/dhclient.conf
  2. add: prepend domain-name-servers;

I followed these steps and it also worked: pi.hole was no longer displayed in pihole. However, it created another problem.
When I activated it, pihole no longer shows me the hostnames in the dashboard but only the local ips.
For example, in the dashboard under Top Clients it then says
"" instead of "Workstation-PC".
Do you understand what I mean?
If I then reverse the steps above, the IPs remain in Pihole but the counter continues to count with the host name. The one for the IP stops.

This may be a small thing, but it's important to me. I don't want to always have to look in the router dashboard to see which device I'm inspecting and would like to see the counter by the host name.

So in short: The solution found above is not a solution, but maybe the way to get there?

And no, unfortunately, the Uptime Bot cannot be configured to avoid the DNS search. Unfortunately, I have not yet found a way to change the DNS server for this explicit application.

I doubt that would properly address your issue.
For once, would point straight to your local DNS resolver - likely, your Pi-hole.
And prepend would suggest that is being added to the list of DNS servers that your system's network management tool is aware of, i.e. it may send DNS requests to any of those servers.

This would have been a coincidence.
Pi-hole's DNS operation is independent from the DNS configuration of its hosts.
To verify, run a reverse lookup for an IP address of a known host through your Pi-hole, e.g. dig -x <ipaddress-of-host> @<ipaddress-of-Pi-hole>.

If you stopped/started your Pi-hole in the process, it may take a bit until Pi-hole figures the hostnames, depending on your Pi-hole's configuration.

No, I'm not stupid. I changed the IP to, the Cloudflare DNS server. Otherwise the whole thing wouldn't make any sense. And because the entry was automatically saved in the "/etc/dhcp/dhclient.conf" above the local dns server entry by these steps, they were also adopted.

I entered it, but it didn't give me a hostname. Although I am using the PiHole as DNS.

Below might help:

pi@ph5b:~ $ cat /etc/resolv.conf
# Generated by resolvconf
pi@ph5b:~ $ resolvconf -l
# resolv.conf from eth0.dhcp
# Generated by dhcpcd from eth0.dhcp

Is available in both packages:

pi@ph5b:~ $ apt-file search /sbin/resolvconf
openresolv: /sbin/resolvconf
resolvconf: /sbin/resolvconf

Your network manager, or whatever, does something similar as below:

pi@ph5:~ $ echo "nameserver" | sudo resolvconf -a eth0.inet
Too few arguments.
pi@ph5:~ $ cat /etc/resolv.conf
# Generated by resolvconf

What does below one show you?

resolvconf -l

I see.
Just be aware that you make it harder for us to help you if you did something different than you shared with us.

Please share the full ouput of your dig, including the exact command.

"Error: Command not recognized"

yes, i'm sorry. it was my mistake, i should have said so.

Command: dig -x @

; <<>> DiG 9.16.37-Debian <<>> -x @
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44320
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 4096
;   IN      PTR

;; Query time: 4 msec
;; WHEN: Tue Mar 07 21:23:57 CET 2023
;; MSG SIZE  rcvd: 56

Ok, that would probably mean openresolv or resolvconf isnt installed and the network manager writes DNS info into resolv.conf in some other way or even directly.
It would help if you post the version of your OS so we might be able to figure out how networking is configured?

Below ones might show for Debian derivatives:

lsb_release -d

cat /etc/issue