-
-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Labels
Description
Related Discourse Post: https://discourse.pi-hole.net/t/cname-records-pointing-to-pi-hole-return-0-0-0-0/81276/
Versions
development:
- Pi-hole: 41f6738e
- Web: 6e60bc90
- FTL: 9d6fd74
Platform
- OS and version: Debian Trixie and Debian Bookworm
- Platform: Raspberry Pi 3B+(Bookworm, on master) and Raspberry Pi 5(Trixie)
Expected behavior
CNAME records pointing to pi.hole
return a localized IP-address instead of 0.0.0.0
.
Actual behavior / bug
CNAME records return 0.0.0.0
when being queried with an advanced DNS Tool like dig
:
$ dig pihole.mydomain.net @127.0.0.1
; <<>> DiG 9.20.9-1-Debian <<>> pihole.mydomain.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48616
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;pihole.mydomain.net. IN A
;; ANSWER SECTION:
pihole.mydomain.net. 0 IN CNAME pi.hole.
pi.hole. 0 IN A 0.0.0.0
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Sun Jul 20 21:40:29 CEST 2025
;; MSG SIZE rcvd: 85
$ dig +short @localhost pi.hole
127.0.0.1
The issue can also be observed in the logs:
$ sudo pihole tail
23:49:12: query[A] pihole.mydomain.net from ::1
23:49:12: config pihole.mydomain.net is <CNAME>
23:49:12: config pi.hole is 0.0.0.0
(more logs at https://discourse.pi-hole.net/t/cname-records-pointing-to-pi-hole-return-0-0-0-0/81276/15)
Steps to reproduce
Steps to reproduce the behavior:
- Add a CNAME record pointing to the special domain
pi.hole
- Observe the wrong response via dig and in the logs.
Debug Token
- URL(Pi 5): https://tricorder.pi-hole.net/knI1DJly/