Not sure if this is a UI bug or whether I'm just not understanding things properly. In the web UI the 'local DNS' page (pihole/admin/dns_records.php) refers to 'domains' when I believe it should refer to 'hosts' instead.
I believe domains is correct. In a HOSTS file, you map domains to IP's.
On Linux the hosts file is explicitly for mapping IP addresses to hostnames and vice versa. (And presumably on other platforms as well). So that's not the reason why the page uses the term 'domains' instead of 'hosts'.
I did some more digging, and it seems that the term 'domains' is sometimes used when referring to the hosts file. Since both 'domains' and 'hosts' are used I'm happy to leave this page as it is, but I would contend that 'hosts' is the more correct term, since each line in the file maps hostnames to an IP address and vice versa: there's no way (in the hosts file) to configure things at domain level, unless you consider a host to be a domain, which is not the way things are normally referred to.
You can very easily use FQDNs in an
Edit: Examples from the man page of hosts:
# The following lines are desirable for IPv4 capable hosts 127.0.0.1 localhost # 127.0.1.1 is often used for the FQDN of the machine 127.0.1.1 thishost.mydomain.org thishost 192.168.1.10 foo.mydomain.org foo 192.168.1.13 bar.mydomain.org bar 188.8.131.52 master.debian.org master 184.108.40.206 www.opensource.org # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Except an FQDN is, in reality, an FQHN - fully qualified host name. In other words, it specifies a host, not a domain.
I have never seen FQDN defined as such.
Pi-hole embeds dnsmasq, and dnsmasq refers to FQDN.
host manual in Linux (emphasis added):
host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given, host prints a short summary of its command-line arguments and options.
name is the domain name that is to be looked up ...
I think we have it correct, and this is neither an error nor a bug.
I've done a bit of searching and I can't find any RFC's or documentation on what a FQHN is. Can you show me where you have found a definition of FQHN can be found?
Apologies folks. I seem to have not realised that in DNS, the term 'domain' is used to refer to individual hosts as well as whole domains.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.