The key point is that when a DNS server is queried for a domain name it does not necessarily start with the official root servers. There are exceptions to that rule which offer you the opportunity to insert your own domain.
Generally speaking, when the DNS server already knows the answer for a query then it uses that answer instead of going through the complete drill starting at the root servers. This applies on all levels. So when a DNS server is asked for somehost.subdom.example.com
and it already knows the NS record for example.com
, it will start with that knowledge and proceed from there directly to subdom.example.com
instead of unnecessarily asking the root servers for the NS record for com
again. Possible sources for that knowledge include the cache of recent queries but also the DNS zones which are configured locally on the server.
Consequently, if you configure a zone example.com
on your DNS server then every query for a domain name below example.com
going through that server will effectively be served from that zone, masking out any results for the same query from the public DNS hierarchy. You'll have created your own private version of that domain. Note that any query not going through your DNS server will still return the results from the public DNS hierarchy, so you'll want to make sure that all DNS queries from your company network go (directly or indirectly) to your DNS server which has that extra zone.