What are the conditions for local hostname resolution?


I've got the latest version of pihole (Pi-hole v5.13; FTL v5.18.2; Web Interface v5.16) on a Pi 3 rev 2

OS is raspbian 32bit v11

Pihole is configured as DNS and DHCP server

100% that my router's DHCP is not enabled.

I can't get the "top clients" data on the dashboard to resolve to hostnames (i did manage this before i wiped my Pi installation, to move to the latest version of pihole).

I've since realised i can't ping by hostname, either from the Pi or another host on my private network.

External DNS resolution appears to work fine (e.g. nslookup returns for google.com).

I suspect i've either misunderstood pihole's functionality or i've not got it configured correctly.

Could someone humour my noobness and confirm what conditions are required for local hostname resolution (as in on my home network)?

many thanks,


Do you see clients in the Pi-hole's Settings > DHCP > Currently active leases? Do they have hostnames or just IP addresses in there? Is the Pi-hole domain name set to "lan" or something else? Do you see any hostnames in Tools > Network?

If you can create a debug log, a dev will be able to take a look and see if anything looks wrong. To create it, use Tools > Generate debug log and select the box to upload, or use the command pihole -d -a to create and upload it. Then post just the tricorder URL here.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

I'm VERY sorry for not having replied to your prompt support. Actually forgot i'd posted this.

(1) Yes i do see:

  • clients in my DHCP active lease list

(2) yes these clients do have hostnames and IPs (two have, one hasn't - i think latter is by design. It's VoIP equipment provided by my ISP)

(3) Pihole's domain was set to "lan". When the top client IPs, etc, weren't resolving, i tried changing the domain to my router one (just for continuity). This made no difference. Historically these IPs have resolved (well all but one).

(4) No i CAN'T see hostnames in pihole tools network

  • clients are visible of course. IPs are there, queries, etc

Am i correct in saying that devices should in theory provide a hostname, if configured?

For example, I've checked my mobile phone (samsung S8) and it does have a generic "galaxy S8" configured hostname, which my phone OS describes as a "phone name" and that:

"this name will be shown on other devices when your phone is available to connect using bluetooth, wi-fi direct and other methods"

I'm happy to provide a debug but doesn't wish to waste your time, if it's just a silly error or misunderstanding on my part of say network behaviour, linux requirements (e.g. i know one can list hostnames in /etc/hostname but this seems very static and i thought hostnames could be obtained through device comms)



Hi Gary, I'm just a nornal user and any info posted in this forum by anyone is of benefit to all users who may come looking in future, so don't be worried about that. From your descriptions I would expect you to be seeing hostnames in all the relevant places – Top Clients, Query Log and Network. And with Pi-hole acting as the DHCP server, even more so (works with much less friction than when router is DHCP server in my experience).

Was this resolved in the end; did it all start working as expected? If not, then if you create a debug log and reply here with the token URL, someone will be able to cast their eye over the network setup and see if anything is amiss.

unfortunately not resolved Chris.

And thanks for the nice, supportive message.

I'd added some static DHCP entries (in pihole) and pihole is picking up the hostnames i specified, when it issues IP leases, so those associations are getting stored i.e. not just broadcast hostnames but custom ones.

They're just not manifesting on the dashboard.

debug - https://tricorder.pi-hole.net/GUq7XzGp/

@Bucking_Horn debug token above



1 Like

Your debug log looks inconspicuous.
(apart from an excessive number of upstream DNS servers, unrelated to your observation)

What's the output of:

nslookup pi.hole

Also, could you provide some examples for your missing hostnames?

that's some reassurance

I banged in multiple upstream DNS servers, because i've found that upstream DNS response varies (i.e. i believe that pihole periodically checks who responds most quickly).

i ran this from one of the clients on the network, rather than pihole and this was the result:

"*** pi.hole can't find Non-existent domain"

Note: i changed the pihole domain from "lan" to one which matched that listed on my router a while ago.

However, i'm not running a domain setup as such (as in the windows meaning, i.e. a centralised account management and authentication process).

I can't honestly remember if i had changed the pihole domain, when hostname resolution WAS working on the dashboard.

historically (this means when i'd configured pihole to be my DHCP server and before i had to blitz my raspberry OS, etc, because it was unsupported by pihole), top clients on the dashboard would resolve to their hostnames.

I didn't have clients and hostnames configured in my hosts file.

I can't remember how i had pihole configured


Never forward non-FQDN A and AAAA queries = ON

Never forward reverse lookups for private IP ranges = ON

conditional Forwarding = OFF



Assuming that this was run on Windows, and your quoted output was preceeded by some lines identifying indeed your Pi-hole as the server answering that requests, this would mean that Pi-hole (or some DNS server taking that request) wouldn't know any names for

Please check your Pihole's Query Log:
Did that PTR reverse lookup request.register in Pi-hole's Query Log?

Also, was the device associated with that IP switched on and connected to your network at the time you made the request?

I ask for examples here, literally. :wink:
Perhaps a UI screenshot showing some of those IP-only entries, an expected hostname for one of those IPs, an excerpt from your Query Logs showing a lookup for that hostname - anything that would help us to get a grip on it.
You could use and adopt the makeshift nslookup I've asked you to run to that end. :wink:

is it possible to share this info privately with you?

I'd prefer not to post hostnames and IP addresses etc publicly.



Message either of us.

thanks. will do

You are correct to assume that Pi-hole's DHCP server would automatically create DNS records for clients that registered a DHCP lease through it, enabling Pi-hole's DNS server to correctly answer respective DNS records, without any additional definitions in Local DNS Records.

This comes with two restrictions:
a) a client has to present a hostname during DHCP lease negotiation
If it doesn't, then Pi-hole won't know a name for the respective client, unless you have assigned one through Pi-hole's Static DHCP leases configuration
b) the client or at least its DHCP lease (as acquired through Pi-hole) has to be active
Again, it the client isn't considered as active, then Pi-hole won't know a name for the respective client.

For a client that would avoid the above limitations, could you run a respective nslookup for its respective hostname as well as its IP address through your Pi-hole as well as through your router (so four commands in total)?

thanks BH


  1. successfully run nslookup in both directions on a network client, 'calling' a host that pihole has issued a (static) IP address for
  • result: returned both hostname and IP
  1. Couldn't find a way of running nslookup on my router (no command line, etc) - only have a ping option.
  • result: I managed to ping same host (as in previous test) via IP but NOT by hostname.
  1. i tried pinging by hostname from client used in test 1.
  • result: Didn't work. "ping request could not find host [insert hostname here]"

Question: did you mean for me to use the router as my DNS server / resolver (when doing nslookup)?

  1. if so, i tried doing this i.e. nslookup host ip address router IP address
  • result: i got "[routername] can't find xx.xx.xx.xx: non-existent domain"
  1. i tried the above using a hostname i.e. nslookup hostname router IP
  • result: "No internal type for both IPv4 and IPv6 Addresses (A+AAAA) records available for [target hostname]



Ah, I probably should have explained better.
By asking you to run the commands "through your Pi-hole as well as through your router" I indeed was requesting your 4. and 5.

Requesting resolution through your router potentially would have revealed if your router would have known a different name than Pi-hole, which may have indicated that some devices would still have registered a DHCP lease with your router.

That doesn't seem to be the case, and your above result from 1., for running those commands by your Pi-hole, shows that Pi-hole indeed holds the respective DNS records, at least for that specific domain-to-ip association.
This in turn would suggest that your Pi-hole should be able to show a hostname instead of an IP in its dashboard and Query Log.

Still, your dashboard only shows an IP instead of its hostname?

If it doesn't, I'm curious whether creating a Local DNS Record for it would change that.

Also, could you please provide a new debug token, as your previous has expired?

correct - only IP addresses.


still only presenting IP addresses for clients on dashboard

i basically used the hostname that i've used in pihole's DHCP and its IP address

just to check - i'm NOT getting errors (and i suspect i wouldn't have been able to add the hostname, etc) but there isn't any character requirements or exclusions for hostnames and when creating a local DNS record?

i use dashes and underscores sometimes, to make names more legible.




Sorry, I've missed your debug token.
Please provide a new one.




Thank you.

Again, even your recent debug log also does not contain any indication why you should not be able to see hostnames. :thinking:

The one peculiarity I noted:
Your Pi-hole's domain name seems to be none, but the domain you intended to use for Pi-hole's Conditional Forwarding (which isn't active, of course, since you use Pi-hole for DHCP) looks like a full blown TLD.
I don't think that would have an impact on your observaton, though.

Did you try to Flush network table under Settings | System yet?
If not, try now to see if that wold have any affect.

If it doesn't, I cannot think of any location but one we haven't checked the source for yet:
The file where pihole-FTL stores its active lease information.

For a known hostname that you are only seeing its IP for in Pi-hole's dashboard, let's check whether that is included by running:

grep <hostname> /etc/pihole/dhcp.leases

where you substitute <hostname> accordingly.

To the same end, you could try to verify that the hostnames as shown on Settings|DHCP under Currently active leases would match those under Static DHCP leases configuration for the same client.


Just tried this

no hostnames visible under "network overview" or under the dashboard. IP addresses and MAC addresses do appear under network. IP addresses are visible under top clients on dashboard

i tested grep on a pihole DHCP issued hostname and it provided:

a 10 digit numeric
MAC address
IP address
then the MAC again but prefixed with "01:"

The details matched the device in network overview and were the expected return for the DHCP lease.

how do i do this? How are these static records stored? Is there something like static.leases?