How to handle DNS on Pi-hole, DHCP on router and also resolve local hostnames


I don't have much network knowledge, but I would like to

  1. keep DHCP on the router, EdgeRouter X

  2. keep DNS on the Pi-hole

  3. be able to resolve local hostnames

Up until now I had been using the same setup, but Pi-hole is showing IPs, while most of devices have hostnames defined in the router's DHCP server.

I don't want to use the Pi-hole's DHCP server, as if it goes down, I risk having issues.
I've been reading a lot of articles about how to achieve this, but it's still not clear what I need to do.
Is there a more specific guide on how to configure this in Pi-hole?


this is my set up. i put local hostnames in /etc/hosts on the device running the pi-hole, still use my router for DHCP..
hope i'm understanding correctly.

Ok, thanks, I'll try that.
I was thinking there is another way, as I'm already maintaining names in the router's DHCP server.

Try run below nslookup on a client (Linux, Windows or MacOS) or on Pi-hole where in my case, is a known client with an active DHCP lease (my laptop) and is my DHCP server:



If that resolves to a name properly, you can configure Conditional Forwarding in the Pi-hole DNS settings to get those IP's resolved to names or names to IP's and also in the GUI:

The Local domain name field you'll have to lookup in your DHCP server settings.

EDIT: added "active DHCP lease".

If Pi-hole goes down you have bigger issues. There isn't much risk here.

1 Like

Yes, this worked for me.
The router was able too lookup the IPs and once I enabled the Conditional Forwarding Pi-hole was able to lookup too.

1 Like