"The DNS domains for your Pi-hole. This DNS domain is purely local. FTL may
answer queries from its local cache and configuration but never forwards
any requests upstream unless you have configured a dns.revServer exactly
for this domain. If no domain is specified and you are using Pi-hole's DHCP
server, then any hostnames with a domain part (i.e., with a period) will be
disallowed. If a domain is specified, then hostnames with a domain parts
matching the domain here are allowed. In addition, when a suffix is set then
hostnames without a domain part have the suffix added as an optional
domain part."
Mind you, this text is different when you click on Settings > All settings
"This DNS domain is purely local. FTL may answer queries from its local cache
and configuration but never forwards any requests upstream unless you
have configured a dns.revServer exactly for this domain. In the latter case, all
queries for this domain are sent exclusively to this server (including reverse
lookups)."
So...
if I am reading this correctly, if I have conditional forwarding setup (which is also confusingly called differently "reverse server" in All Settings), and the domain in my Conditional Forwarding settings matches the name I enter in the dns.domain field EXACTLY, meaning the two search domains are the EXACT SAME, that non-FQDN domain lookups/queries e.g. simply "hemingway" will automatically be sent to the server listed in my Conditional Forwarding settings for a response?
Can someone explain in very simple terms what setting the dns.domain field on the pihole will actually do? and what conflicts may arise if my DHCP server provides a search domain/domain suffix for its hosts?
Typically, dns.domain should match your router's local/search domain.
Setting a dns.domain forces Pi-hole to keep DNS resolution local.
Assuming your dns.domain would be lan, Pi-hole would never forward any *.lan queries upstream.
The exception is if you enable Conditional Forwarding (or supply dns.revServers) for a dns.domain: Pi-hole would then forward *.lan queries to the configured target server (commonly, your router). You probably want to do so if your router runs a DNS server that is aware of the router's DHCP clients names (note that not all routers do so).
Simple hostnames like hemingway are also affected by this, but note that clients with knowledge of a local/search domain can also be expected to expand their lookups accordingly, i.e. they would query for hemingway as well as for hemingway.lan.
That would depend on how configured your router to make use of Pi-hole:
a. Is it telling its clients to use Pi-hole for DNS?
b. Is it using Pi-hole as its upstream and keeping to tell its clients to use itself for DNS?
Then Pi-hole will be the first to answer in your resolution chain.
If you create a Local DNS record for hemingway pointing to 10.21.7.99, while dns.Expand.Hostsis set to true and dns.domain is set to domain.lan, Pi-hole will automatically add the respective FQDN DNS record, i.e. both hemingway as well as hemingway.domain.lan will resolve to 10.21.7.99.
A query for e.g. hemingway.domain.lan will first be looked up locally, and if a Local DNS record for hemingway.domain.lan is found, then Pi-hole will use that for its reply, i.e. it won't forward the query in that case.