Cloudflared DOH setup does not show hostnames

My install, Pihole installed using DOH enabled. I used the following guide.
Cloudflared DOH
I triedboth using both ways, conditional forwarding or not.

The issue I am facing:
When I use no conditional forwarding, all my clien in Quesry Log is localhost
When I use conditional forwarding I get IP addresses client.
How do I get the hostbnames?
If I use regular install, not DOH, I get hostnames in client column.

Please upload a debug log and post just the token 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

Here's the token.


Since your router is handling DHCP, Pi-hole wouldn't know the names in your network by itself, it has to query a server that does.

Your debug log shows you've already enabled Conditional Forwarding to have Pi-hole query your router at for names.

Let's see if your router knows about hostnames by asking it directly, much as Pi-hole would.
What is the result of the following commands:


They timed out. why would that be?
My secondary dns server running non-doh setup do show hostmanes.

What "secondary" DNS server are you running?

It's another pi-hole but not setup form doh. I am using OpenDNS family shield there.

What is your router using as upstream DNS servers?

Should I remove that and leave it blank?

Does that mean that your router is using Pi-hole and as its upstream DNS servers? What is your motivation for using Pi-hole as your router's upstream?

If it is using, that would allow your router to by-pass Pi-hole.

But that maybe of little relevance, as your DHCP clients would use Pi-hole for DNS anyway:
Your debug log shows your router is distributing two private IP addresses as local DNS servers (presumably your two Pi-holes):

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

By enabling Conditional Forwarding, your Pi-hole would query your router for local hostnames, and your router would forward any query it cannot answer itself to one of its upstreams.
If it forwards to Pi-hole, that would close a DNS loop, bouncing queries back and forth between Pi-hole and your router forever, or until time-out.

In such a constellation, a time-out would likely indicate that your router doesn't know any DNS records for your local hostnames.

Switching your router to use its defaults for upstream DNS would avoid such a loop.
I'd then expect your router to answer requests for local hostnames with NXDOMAIN, proving it doesn't register DNS records for its DHCP clients.

Got it, thanks. I think it's clearer now how to set it up.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.