Customizing Client Hostnames

I am using PiHole in a docker on unRAID. My router is a Ubiquiti Unifi USG and I am still using the USG as my DHCP server.

It appears that the hostnames shown in pihole come from the /etc/hosts file on my router. Some of these are incorrect in that they are for devices that previously used that IP. Is there any way to customize the hostnames shown in pihole? I have manually defined these names in my Unifi controller. In many instances I have also defined these names in Fing as well as I have a Fingbox device that I use to help monitor my network. It would be great if I could somehow create a hosts file from what I have manually entered in Unifi or Fing.

You could easily edit /etc/hosts on your VM running Pi-hole to that end.

Note that you’ll introduce yet a third location where you assign names for local hosts within your network.

And you can embed only one other source (normally, your existing DHCP server, i.e. your router in most cases) for local name resolution by enabling Conditional Forwarding on your Pi-hole.

For ease of maintenance, you might want to aim for a more unified approach for local host names.

Thanks. Currently Conditional Forwarding is on and it is set to my router - 192.168.1.1. The Local Domain Name is localdomain. What does that do? And what is the significance of the localdomain.

Its just a name.
They could also have named it dodadodadomain and it wouldn’t make a difference.
But with this domain suffix added to the actual short hostnames of your clients, it gets turned into a FQDN or partially FQDN.
Only condition for a FQDN is to have a dot somewhere … I believe :wink: