Guidelines for local and internal DNS suffixes
Guidelines for local and internal DNS suffixes
I've checked other discussions online for similar topics on setting up internal DNS in a personal or hobby setup. Most agree you should use a real FQDN and a domain that's publicly registered, like myhome.mydomain.com. Then your hosting provider will assign your devices to this domain, so PC1 gets an IP from Pi-Hole and its DNS suffix becomes myhome.mydomain.com, making the host address pc1.myhome.mydomain.com. I think I grasp the basics but have some doubts. Below is how I imagine it works: if mydomain.com can have A records on a public server for other sites (like www.mydomain.com), myhouse.mydomain.com shouldn't point anywhere public—it's meant for internal use, except perhaps a reverse proxy or VPN. When a local device looks up x.myhouse.mydomain.com, Pi-Hole recognizes it as local thanks to the DHCP domain and won't forward it. Similarly, www.mydomain.com will be forwarded because mydomain.com isn't local. Because of these settings, each domain is handled separately—mydomain.com and myhouse.mydomain.com are treated differently. Without a local domain, the resolver would try to resolve everything directly, which usually fails for internal sites. The local domain setting ensures only internal addresses are resolved locally. Essentially, your setup relies on the DHCP domain you set—it's what makes the local DNS suffixes like pc1.myhome.mydomain.com valid. If I'm misunderstanding or missing something, please let me know so I can clarify. Also, could you explain how the local domain setting functions?
It's accurate to say that without a local resolution method it tries to check root or upstream DNS servers. You don't always require a publicly registered domain for this process. A personal DNS server can work, and using a top-level domain like google.com ensures lookups stay local, preventing upstream redirection. This approach mirrors internal IP usage, but it's strongly discouraged as it blocks access to those services from any local machine.
Additionally, certain domain extensions such as .local are designed not to resolve publicly, allowing you to use private suffixes without registration if desired.
It's still recommended to avoid doing that even though it might lead to problems, as long as everything is configured properly it should function well.