Casaos - Pihole don't resolve local ip names

Hi all!
i have followed Bigbearyouyube tutorial for install Pihole docker on my CasaOs without any issue.
Pihole like dns on my lan works and block ads as normal.
My fritzbox is the dhcp server and i set the pihole ip ad dns relased so every device use pihole as dns.
The problem starts when from my laptop i try to ping the casaos server with his name,
Instead resolving it like, that is the correct server ip, it’s resolved like this
The nslookup shows:

Non-authoritative answer:

From any device configured with pihole ip as dns i can’t reach the right local ip address, and another strange thing, every device i try to do nslookup shows every time always as ip.

If i rollback the dns from dhcp server setting to my router ip, all starts to running again without issues (but obviously without blocking any ads) and every nslookup shows the right ip address of my devices.

If i set on dhcp my pihole dns server, nslookup shows every time:
Non-authoritative answer:

Where i’m wrong?

The issue arises with how Pi-hole and its upstream DNS server handle local domain names (like ). Since these local domain names are not part of the global DNS system, the upstream DNS server cannot resolve them to their local IP addresses. As a result, the request might be mistakenly resolved to an external IP address if the upstream DNS server attempts to “guess” or if there’s a wildcard DNS record in place for unresolved queries, which seems to be happening in your case with the IP address being returned.

To solve this issue, you can manually add local DNS records in Pi-hole for your local devices. This way, when a DNS request for reaches Pi-hole, it can directly respond with the correct local IP address without forwarding the request to its upstream DNS server. Here’s how you can do it:

  • Access the Pi-hole admin interface.
  • Go to the “Local DNS” menu, then to “DNS Records.”
  • Add a new DNS record for each of your local devices, specifying the hostname (e.g., and its corresponding local IP address (e.g.,
  • Save the changes and ensure the DNS cache is cleared on your devices, or restart them to ensure they query for the latest DNS information.