Could not resolve hostname

Expected Behaviour:

Pi-hole static IP addr: 192.168.8.10 (DHCP ON)
Pi-hole domain name: "lan"
System: Ubuntu 20.04.02 LTS
Pi-hole expected hostname: server-dns (or serverdns or server.dns)
I want to connect to Pi-hole via server-dns hostname

Actual Behaviour:

FROM WINDOWS:

> nslookup server-dns
Server:  server-dns
Address:  192.168.8.10

*** server-dns can't find server-dns: Non-existent domain

> nslookup pi.hole
Server:  server-dns
Address:  192.168.8.10

Name:    pi.hole
Address:  192.168.8.10

FROM PI-HOLE (localhost):

~$ nslookup server-dns
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   server-dns
Address: 192.168.8.10
cat /etc/resolv.conf
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 127.0.0.1
# /etc/resolv.conf.tail can replace this line
cat /etc/dhcpcd.conf 
interface eth0
        static ip_address=192.168.8.10/24
        static routers=192.168.8.1
        static domain_name_servers=127.0.0.1

Update: pihole.log when Im trying to: nslookup server-dns:

Feb  9 13:52:06 dnsmasq[1856]: query[A] server-dns.lan from 192.168.8.113
Feb  9 13:52:06 dnsmasq[1856]: cached server-dns.lan is NXDOMAIN
Feb  9 13:52:06 dnsmasq[1856]: query[AAAA] server-dns.lan from 192.168.8.113
Feb  9 13:52:06 dnsmasq[1856]: cached server-dns.lan is NXDOMAIN

Update #2:

ubuntu@server-dns:~$ cat /etc/pihole/local.list
192.168.8.10 server-dns
192.168.8.10 pi.hole

Update #3
Now I know why it doesn't work. Windows asks DNS for "server-dns.lan" and the local.list file has only "server-dns". What to do with this?

The commands I tried:

ipconfig /release
ipconfig /renew
ipconfig /flushdns

Debug Token:

DEBUG TOKEN

nslookup server-dns.

For Pi-hole to also resolve server-dns.lan, define a Local DNS Record for that name.

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