# \[SOLVED\] Local DNS not working for itself but every other host

**URL:** <https://discourse.pi-hole.net/t/solved-local-dns-not-working-for-itself-but-every-other-host/47624>\
**Category:** Help\
**Created:** [June 13, 2021, 6:35pm UTC](https://discourse.pi-hole.net/t/solved-local-dns-not-working-for-itself-but-every-other-host/47624 "2021-06-13T18:35:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pratham](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/pratham/32/25746_2.png) [@pratham](https://discourse.pi-hole.net/u/pratham)\
**Post date:** [June 13, 2021, 6:35pm UTC](https://discourse.pi-hole.net/t/solved-local-dns-not-working-for-itself-but-every-other-host/47624/1 "2021-06-13T18:35:38Z")

</div>

I have pi-hole currently running on my Raspberry Pi 4 B. The problem I'm facing is that I have a few Local DNS records saved [using the Web GUI], and every single DNS query results in correct IP address. But querying it using `ping sentinel.local` (`sentinel.local` is what I have set for the Raspberry Pi) doesn't work. at. all.

[everything below this line is about the Pi on which I have pi-hole running]  
Pi-hole version is v5.3.1 (Latest: v5.3.1)  
AdminLTE version is v5.5 (Latest: v5.5)  
FTL version is v5.8.1 (Latest: v5.8.1)

DISTRIB\_ID=Ubuntu  
DISTRIB\_RELEASE=20.04  
DISTRIB\_CODENAME=focal  
DISTRIB\_DESCRIPTION="Ubuntu 20.04.2 LTS"

```auto
cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 sentinel.localdomain sentinel

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

```

```auto
cat /etc/hostname
sentinel

```

```auto
cat /etc/pihole/custom.list
10.0.0.11 chief.local
10.0.0.12 ringmaster.local
10.0.0.13 flameboi.local
10.0.0.14 sentinel.local
10.0.0.15 backup.local
10.0.0.16 tv.local
10.0.0.20 0.vm
10.0.0.21 1.vm
10.0.0.22 2.vm
10.0.0.23 3.vm
10.0.0.24 4.vm
10.0.0.25 5.vm
10.0.0.26 6.vm
10.0.0.27 7.vm
10.0.0.28 8.vm
10.0.0.29 9.vm
10.0.0.30 x.vm

```

[everything from this line below is run on a client using 10.0.0.14 (IP address of the Raspberry Pi with pi-hole) as it's DNS]

nslookup works...

```auto
nslookup sentinel.local
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: sentinel.local
Address: 10.0.0.14

```

dig works too...

```auto
dig sentinel.local

; <<>> DiG 9.16.1-Ubuntu <<>> sentinel.local
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55299
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;sentinel.local. IN A

;; ANSWER SECTION:
sentinel.local. 2 IN A 10.0.0.14

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Jun 13 23:43:02 IST 2021
;; MSG SIZE rcvd: 59

```

**but ping doesn't**

```auto
ping sentinel.local
ping: sentinel.local: Name or service not known

```

[log entries of running `pihole -t` while I run `ping` and `nslookup` on a client]

log entry when I run `nslookup`

```auto
23:40:17: query[A] sentinel.local from 10.0.0.13
23:40:17: /etc/pihole/custom.list sentinel.local is 10.0.0.14
23:40:17: query[AAAA] sentinel.local from 10.0.0.13
23:40:17: cached sentinel.local is NODATA-IPv6

```

log entry when I run `ping`

```auto
23:41:25: query[SOA] local from 10.0.0.13
23:41:25: forwarded local to 127.0.0.1

```

log entry when I run `dig`

```auto
23:43:02: query[A] sentinel.local from 10.0.0.13
23:43:02: /etc/pihole/custom.list sentinel.local is 10.0.0.14

```

Why does `nslookup` and `dig` work but `ping` doesn't? I did make a [Git issue](https://github.com/pi-hole/pi-hole/issues/4138) previously, but it turned out it wasn't a pi-hole problem. Don't want to harass the dev with my own issue [again].

_I did have 10.0.0.14 network wide, but do not use it currently_

[`pihole -d`](https://tricorder.pi-hole.net/e5dq5s8st5)

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [June 13, 2021, 11:07pm UTC](https://discourse.pi-hole.net/t/solved-local-dns-not-working-for-itself-but-every-other-host/47624/2 "2021-06-13T23:07:24Z")

</div>

1.) Don't use _`.local`_ as your DNS domain name.  
`.local` is reserved for usage by the [mDNS protocol](https://en.wikipedia.org/wiki/Multicast_DNS).

2.) Note that `laptop` and `laptop.lan` are two distinct domains  
Each domain would need its own DNS record (or records) to be resolved successfully.

3.) For automatic consideration of your local domain name, see e.g. [[SOLVED] How can I get the local domain name auto suffixed to hostnames in DHCP?](https://discourse.pi-hole.net/t/solved-how-can-i-get-the-local-domain-name-auto-suffixed-to-hostnames-in-dhcp/46876)

---

<div class="post-metadata">

**Author:** ![pratham](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/pratham/32/25746_2.png) [@pratham](https://discourse.pi-hole.net/u/pratham)\
**Post date:** [June 14, 2021, 3:41am UTC](https://discourse.pi-hole.net/t/solved-local-dns-not-working-for-itself-but-every-other-host/47624/3 "2021-06-14T03:41:40Z")

</div>

`.lan` works flawlessly! Thank you!

~~On a side note (if you could help), every single device which my router shows on it's "Network Map" is now named "SENTINEL". Any way to prevent this?~~

Edit: fixed and crossed out

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [July 5, 2021, 3:42am UTC](https://discourse.pi-hole.net/t/solved-local-dns-not-working-for-itself-but-every-other-host/47624/4 "2021-07-05T03:42:01Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
