Changing from etc/hosts to custom.list


I removed all additional entries for my clients from the hosts file to the custom.list file. So I am able to edit them in the pi-hole webui under „DNS Records“.

Now all client names are still resolved in the statistics - that was easy and looks as usual. But NOT in the long-term database statistics, only the IPs are shown here!

new /etc/hosts: localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters raspberrypi

I am ussing the router for DHCP.
Did I miss something, are there additional steps to do?


It's the same for me. I'm not sure if it was always like that or if this is a regression/bug.

I don't think that it's related, but you have a duplicate IP in your hosts file which can cause issues with some functions.

Change the last line to raspberrypi which matches the Raspberry Pi OS default: All 127/8 IPs are practically loopback IPs, so nothing changes about the result of using that hostname.

I cannot confirm this, it works for me.

But maybe long term entries/IPs shouldn't be translated to a hostname.
As IP address assignment can change, there is no guarantee that an IP observed in the past is still assigned to the same host network interface as today.

To make it a bit clearer:

In the router I have set all clients to fixed IPs.
These IPs and the clients were also listed in the hosts file like: iPhone iPad

All clients were visible with this name in the Pi-hole statistics.

Moving these lines to the custom.list file results in the described behaviour. Only all localhost PTR queries are displayed as „localhost“.

I only want to do this to see all names in all statistics, instead of the IPs (like most users want I think), and to use the webui for editing these lines.