DNS Hostname not Resolving


Expected Behaviour:

When viewing the dashboard of my PiHole, specifically but not only, the Top Clients section displays every client's IP address. I want to see their hostname on the network so they are more identifiable.


  • macOS 11.4
  • Safari version 14.1.1 (16611.
  • Pi-hole v5.3.1
  • Web Interface v5.5
  • FTL v5.8.1
  • TP-Link AX3000 double band WiFi 6 Router

Actual Behaviour:

Steps I have taken:

My PiHole is only handing DNS queries, not DHCP. My router's primary and secondary DNS server is my PiHole's IP address. I am seeing results for number of queries and number of devices and such correctly. Only the names are not resolved in these tables.

One thing I did change was in file /etc/dhcpcd.conf:

interface wlan0
        static ip_address= # PiHole's address
        static routers= # Router's IP address
        static domain_name_servers= # Backup Cloudflare DNS

I have enabled Conditional Forwarding on my PiHole, unchecked Never forward non-FQDNs and Never forward reverse lookups for private IP ranges. For the three fields in Conditional Forwarding, I put in my CIDR block as /24 even though mine in /23. The IP address of my router and left the local domain name blank as I can not determine mine. I have added a single IPv4 Upstream DNS Server (top of the Settings > DNS page) that points to my router.

Debug Token:


There are several discrepancies where your expected or claimed configuration does not match your debug log information.

Your debug log shows that is your RPi's IPv4 address:

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the wlan0 interface: does not match the IP found in /etc/pihole/setupVars.conf

But Pi-hole is configured for instead:

*** [ DIAGNOSING ]: Setup variables

This also seems to be the IPv4 that your router would hand out to your RPi:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   * Received 300 bytes from wlan0:
     Offered IP address:
     Server IP address:
     DHCP options:
      Message type: DHCPOFFER (2)
      --- end of options ---

You'd have to align Pi-hole's configuration with its IP address, either by changing or removing your wlan0 configuration lines from your RPi's dhcpcd.conf or by running pihole -r with Reconfigure.

In addition, your router distributes an alternate DNS server in addition to Pi-hole.
This contradicts:

This will allow clients to bypass Pi-hole via
Pi-hole has to be your network's only DNS server to avoid that.

Your router is also distributing a netmask of, which is a /24 in CIDR notation.
This contradicts:

And you have configured five upstream DNS servers for Pi-hole.
This contradicts:

If you indeed were using your router as Pi-hole's only upstream DNS, there would be no reason to enable Conditional Forwarding, as your router would already see all DNS requests anyway.

This may be the better approach in your case, as you do not seem to know your router's search domain, which may leave certain DNS requests for local names unresolved if using CF.

But neither using your router as Pi-hole's sole upstream nor enabling CF won't help with your issue if your router wouldn't be able to answer DNS requests for local hostnames at all.

Let's see if your router falls into that category.
The following statement should return the hostnames for as known by your router at


You may also try that for other client IPv4 addresses in your network.

If none returns any names, you could define them using Pi-hole's Local DNS Records.

HI @Bucking_Horn,

Thank so much for your help and guidance in this. I have had a colleague of mine help who works in networking as I'm just in software, so bit of a self learning newbie.

So I edited the /etc/pihole/setupVars.conf file to now have the correct static IP of the PiHole ( So to confirm I will remove the wlan0 bits I added in my /etc/dhcpcd.conf file?

As for NSLookup, none of them return anything. What they return is this:
SS 2021-06-06 at 10.39.34 PM

As for my 5 DNS servers: I configured my PiHole to use the Quad9 as per the config I did when I first setup PiHole, and I just unchecked the 2 for Cloudflare. Are you saying that I should uncheck all the boxes here to get that back down to one as it seems you suggest, it should be?
SS 2021-06-06 at 10.44.30 PM

I will have to find a guide as for using DNS records. I have dynamically assigned IPs and don't want to statically or reserve IPs.

New Debug Log:

New Debug log:

Why did you do that?
You should not edit setupVars.conf manually.

My advice was:

If your router is your DHCP server, DNS requests for local hostnames have to be passed on to your router, either by enabling CF or by using your router as Pi-hole's only upstream.

But as your nslookup results suggest that your router does not provide DNS resolution for its DHCP clients anyway, there is no use in passing DNS requests for local names to it.
Use whatever public DNS servers you prefer as Pi-hole's upstreams.

As for local hostnames:

Ran configure on it and got this :slight_smile:

Your IPv4 address seems correct now:

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the wlan0 interface: matches the IP found in /etc/pihole/setupVars.conf
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] lock.omkarfatale.in is via localhost (
[✓] lock.omkarfatale.in is via Pi-hole (
[✓] doubleclick.com is via a remote, public DNS server (

Also, your router is now correctly distributing only Pi-hole as local DNS server:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   * Received 300 bytes from wlan0:
     DHCP options:
      Message type: DHCPOFFER (2)