Cloudfare DNS + Local Router?

I've read a lot of options regarding using Cloudfare DNS, but I also wanted to include my router's DNS server as well so various hostnames can be established on my local network.

My router is providing DHCP.

I can't seem to find much info about this...

Do I want to configure my router to point to the Pi Hole IP for DNS and leave Pi Hole configured for Cloudfare + the local router's gateway?

I assume I should NOT configure my router/gateway to point DNS to the Pi Hole + the local gateway. But rather I should have my gateway pointing DNS to the local Pi Hole IP, and then have Pi Hole point to Cloudfare + the gateway for local name resolution... correct?

With parallel upstream DNS servers, there is no guarantee which of them will get the request for the local domain info.

Perhaps this will be the best flow for you:

client > Pi-hole > router > Cloudflare

Or, map the local names in Local DNS records in Pi-hole, then Pi-hole can answer them immediately with no involvement from the router

client > Pi-hole > Cloudflare

Thanks for the reply! Not sure I follow....

If the router was configured to push the client's DNS to that of Pi Hole, then you're saying I would need to have my router's DNS pointed to Cloudfare? That doesn't make sense to me because the rotuer, providing DHCP would be using the same DNS settings that it sent to the client, right?

Running Ubiquiti UDM Pro, I have the option to specify 4 different DNS servers to use.

If Pi Hole pointed to Cloudfare as well as the local router, wouldn't it still resolve local hostnames on my local network? If the machine attempted to resolve via Cloudfare, of course it would fail, but then it would attempt the alternate DNS server right?

Try both methods and use the one that gives the result you want.

Well I was hoping someone could comment on the technical configuration aspect, but I guess I can test different scenarios and report back.

Just to circle back on this one.

UDM Pro -> DNS points to Pi Hole
Pi Hole -> DNS points to cloudfare, plus a custom DNS entry back to the UDM Pro (

Works like a charm!

The flow of " client > Pi-hole > router > Cloudflare" wouldn't work since the router handles DNS via DHCP.

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