SOLVED: Help with Conditional forwarding config to resolve local hostnames

Please follow the below template, it will help us to help you!

Expected Behaviour:

To resolve dns names for devices through pihole like esphome-subwoofer without manually entering them into pihole

Unifi UDMP [10.30.10.1] handles routing & DHCP with the following VLANs:

Pihole [10.30.20.199] version: Docker Tag 2024.06.0, Pi-hole v5.18.2, FTL v5.25.2, Web Interface v5.21

Actual Behaviour:

Currently, pihole is responding to all DNS queries but failing for local names that are registered with the UDMP which is handing DHCP. When forcing to using any of the VLAN DNS servers on the UDMP, it does resolve the local name correctly.

poldim~$ nslookup esphome-subwoofer
Server:		10.30.20.199
Address:	10.30.20.199#53

** server can't find esphome-subwoofer: NXDOMAIN

poldim~$ nslookup esphome-subwoofer 10.30.10.1
Server:		10.30.10.1
Address:	10.30.10.1#53

Name:	esphome-subwoofer
Address: 10.30.30.166

poldim~$ nslookup esphome-subwoofer 10.30.20.1
Server:		10.30.20.1
Address:	10.30.20.1#53

Name:	esphome-subwoofer
Address: 10.30.30.166

poldim~$ nslookup esphome-subwoofer 10.30.30.1
Server:		10.30.30.1
Address:	10.30.30.1#53

Name:	esphome-subwoofer
Address: 10.30.30.166

Debug Token:

https://tricorder.pi-hole.net/zTX2F6bW/

Those DNS requests are for a plain, non-FQDN hostname.
Untick Never forward non-FQDN A and AAAA queries under Settings | DNS.

Thank you!

Do you happen to know why a non domain labeled address is resolving but one with .local is not resolving? I've tried this with and without the Local domain name being set and in both cases this happens:

poldim~$ nslookup esphome-subwoofer
Server:		10.30.20.199
Address:	10.30.20.199#53

Name:	esphome-subwoofer
Address: 10.30.30.166

poldim~$ nslookup esphome-subwoofer.local
Server:		10.30.20.199
Address:	10.30.20.199#53

** server can't find esphome-subwoofer.local: NXDOMAIN

.local is reserved for mDNS usage and should NOT be used with plain DNS.

Furthermore, your debug log shows your router's DHCP server to distribute a local domain name of 'khaz'.

You should consider to use that instead of local, and add it as Local domain name to Pi-hole's Conditional Forwarding as well.