TLD redirects to a specific Authoritative Name Server

Solution 1:

The answer: One root nameserver is picked up. It doesn't really matter which one, because the only important part is to start the resolving process.

Although there are relatively few root domains (such as .com), they are served by hundreds of DNS root servers all over the world. Each one has many servers, which use Anycast routing to distribute requests based on load and proximity.

Since the DNS root zone is at the top of the DNS hierarchy, recursive resolvers cannot be directed to them in a DNS lookup. Because of this, every DNS resolver has a list of the IP root server addresses built into the software. Whenever a DNS lookup is initiated, the recursor’s first communication is with one of those IP addresses.

The address of at least one root server must be known for bootstrapping access to the DNS. For this purpose, operating systems or DNS server or resolver software packages typically include a file with all addresses of the DNS root servers. Even if the IP addresses of some root servers is unknown, only one is needed to retrieve the current list of all name servers.

With the IP address of only one functioning root server, all other DNS information can be discovered recursively, to find information about any domain name.

Solution 2:

The parent domain doesn't merely have records "for many authoritative servers" – it has records for your specific domain which point to its authoritative servers. Each domain has its own nameserver records, there is nothing like "a big pool of servers".

For example, the .com zone might have entries like:

example.com.     NS    ns1.hostgator.com.
                 NS    ns2.hostgator.com.

google.com.      NS    ns1.google.com.

ns1.google.com.  A     8.9.0.1
                 AAAA  2001:db8::7

As you can see, the domain you bought is nothing more but a subdomain of the "com" domain, delegated to another server using NS records. (You can repeat the same procedure in your own domain, delegating a few subdomains to different DNS providers.)


When you buy a domain from a registrar, you specify the nameservers you want (which might be the registrar's own, or something else) and the registrar submits this information to the registry.

This transmission is usually done using the EPP protocol, although it's up to each TLD's registry to decide the exact mechanism. (When a registrar signs the agreement with a registry it is given the necessary access to create and update domains.)

When the registry receives this information, it adds NS records to the TLD's zone, pointing your domain at your chosen nameservers. (It may also add DS records for DNSSEC, and "glue" A/AAAA records for nameservers which exist under their own domain. All of this information is submitted by the registry through EPP.)