How do I show hostnames instead of IP addresses in the dashboard?


There are two ways to accomplish this:

  1. use Pi-hole’s built in DHCP server
  2. use your router’s DHCP server and modify /etc/hosts on your Pi-hole machine

Use Pi-hole’s DHCP server

When you enable Pi-hole’s DHCP server, you have the option to assign DHCP reservations and pair them with a hostname. Just make a reservation for every device on your network.

Edit /etc/hosts on your Pi-hole

The other option is useful if you want to keep your existing DHCP server (usually your router) and just use Pi-hole for DNS.

All you need to do is edit the /etc/hosts file on your Pi-hole to add hostnames and IP addresses. These will then show up in the query log.

/etc/hosts Network-wide

Normally, /etc/hosts applies only to the machine on which the file exists. But since Pi-hole is acting as a DNS server (resolving names into IP’s) this file becomes available to any device using Pi-hole for DNS.

DHCP Reservations

You should also note that if you do not use DHCP reservation from your router, if you assign a hostname to an IP and your router hands out that IP to a different device than you are expecting, the names may not be accurate.

Privacy Settings

Please note that for either option above, if you have the privacy mode enabled, the hostnames will not show in the dashboard.

Names (custom) or device name instead of IP's
How to show hostname instead of ip in query log?
Machine Name List
Rename Top clients?
DNS Record list editor
Assign alias to IP numbers for easier identification
How do I configure my devices to use Pi-hole as their DNS server?
New Settings Page Addition
Can't get hostnames to resolve with Conditional Forwarding
How do I determine what device is making a query?
Complete client info, request info?

Thanks all for you answer It’s clear.
I was first thinking that the name in my (Not pihole ) DCHP server can be used now i understand why i have always Ip :wink:


Just a quick remark :

Hosts file modification need a reboot to be taken into account (For newbie like me)


Good point. I think we could also probably just

pihole restartdns

but I’ll have to check to make sure.


This is true. Thanks. FYI pihole restartdns does not resolve this. It does in fact require a reboot.


I know this is old but I didn’t need to reboot, I just ran sudo service pihole-FTL restart. I had already restarted dnsmasq so not sure if that needs to be done first or not.


I’m using Pihole 4.0 and i do not see host names anywhere. I’m running in net=host mode, using Pihole’s DHCP server. In order to see hostnames instead of IP addresses i had to edit the hosts file.

Was using pihole 3.3 previously and the behavior was the same.