Expected Behaviour:
Requests to local domains should get resolved as set in the dashboard
Actual Behaviour:
According to query logs, they get forwarded to the upstream dns server. I can only get the dns.hostRecord setting to work. Local CNAME records work fine, only A is the problem. It was working fine until I did a routine reboot. Same result with a fresh install of pihole.
Debug Token:
https://tricorder.pi-hole.net/4HA2MnRl/
There are a few irregularities in your debug log, but let's focus on your local A records first.
Please provide an example of a failed dig or nslookup of a local name, along with the corresponding log lines.
I have no idea why but it suddenly started working today, after 5 days.
(For people that find this on Google, here is my workaround I used:
Custom dnsmasq config in /etc/dnsmasq.d/ with host-record entries.)
Now I have a second issue, which is a bit simmilar. Since my pihole is on a macvlan network in docker, my docker host can't reach it directly. So I setup my Fritzbox to use pihole and my docker host to use the Fritzbox. The queries go through pihole but I get an error on the enddevice. Could you help me with that as well or should I make a new post?
nslookup output on my windows pc with pihole directly and through the fritzbox:
C:\Users\Peasplayer>nslookup test.internal fritz.box
Server: fritz.box
Address: 192.168.178.1
*** Keine internal type for both IPv4 and IPv6 Addresses (A+AAAA)-Einträge für test.internal verfügbar.
C:\Users\Peasplayer>nslookup test.internal
Server: pi.hole
Address: 192.168.178.4
Name: test.internal
Address: 192.168.178.3
Output in pihole.log:
2026-08-18 11:32:48.080 query[A] test.internal from 192.168.178.1
2026-08-18 11:32:48.091 /etc/pihole/hosts/custom.list test.internal is 192.168.178.3
2026-08-18 11:32:48.092 query[AAAA] test.internal from 192.168.178.1
2026-08-18 11:32:48.095 config test.internal is NODATA-IPv6
2026-08-18 11:33:36.391 query[A] test.internal.fritz.box from 192.168.178.61
2026-08-18 11:33:36.391 forwarded test.internal.fritz.box to 9.9.9.9
2026-08-18 11:33:36.394 reply test.internal.fritz.box is NXDOMAIN
2026-08-18 11:33:36.394 query[AAAA] test.internal.fritz.box from 192.168.178.61
2026-08-18 11:33:36.424 cached test.internal.fritz.box is NXDOMAIN
2026-08-18 11:33:36.427 query[A] test.internal from 192.168.178.61
2026-08-18 11:33:36.427 /etc/pihole/hosts/custom.list test.internal is 192.168.178.3
2026-08-18 11:33:36.429 query[AAAA] test.internal from 192.168.178.61
2026-08-18 11:33:36.430 config test.internal is NODATA-IPv6
The response is the same, but there are two more requests when I directly use pihole with .fritz.box added to the end, which get forwarded to upstream.
Any idea why they produce different results?
Because test.internal and test.internal.fritz.box are different domains.
It is common that nslookup would issue additional DNS requests, expanding a given domain by the local search domain.
In your case, clients will use .fritz.box, as your router is propagating that as a local domain.
However, your debug log showed that you instead use .internal with your hostnames, while having configured a .pihole.lan domain as dns.domain.name.
You should consider to go along with your router and use fritz.box exclusively as your local domain.
Your debug log has expired by now, but this was one of the irregularities I mentioned.
I'm using internal because I think it's cleaner and suggested by the ICANN for local domains.
Would it make a difference to change .pihole.lan to .internal? .fritz.box only gets appended by the fritzbox and no other device.
It also doesn't explain why I get that issue on nslookup despite pihole answering with records.
Your wrong with that.
Its very simple.
Most important to remember is that you can only query FQDN's via DNS (a dot somewhere in the name).
Fritzbox OOTB advertises the fritz.box search/suffix domain name via DHCP to all its clients and you cant alter this name!
And when querying a short hostname without any dots from a client, the client DNS implementation appends that fritz.box suffix to the query (not Pi-hole) for convenience and for turning it into a FQDN.
Eg on a Windows client of mine:
C:\>ipconfig /all
[..]
DNS Suffix Search List. . . . . . : home.dehakkelaar.nl
If I do a lookup for a short hostname on this client:
C:\>nslookup hak01
Server: ph6a.home.dehakkelaar.nl
Address: 10.0.0.2
Name: hak01.home.dehakkelaar.nl
Address: 10.0.0.234
You'll see a FQDN being queried in the Pi-hole logs instead of only the short hostname:
$ sudo pihole tail
[..]
22:30:55: query[A] hak01.home.dehakkelaar.nl from 10.0.0.179
And since you cant change the fritz.box search/suffix domain name, its futile to configure any other names in Pi-hole.
And most likely doesnt work as expected.
So you have to stick with fritz.box as a search/suffix domain name in all your configurations.
Or disable the DHCP service on Fritzbox and replace it by Pi-hole's own DHCP service where you can actually change the suffix domain name.