Root Servers and the Top of the DNS Tree
Find out what the DNS root servers hold, why there are thirteen names but far more machines and how the top of DNS stays up.
Key takeaways
- Root servers publish the root zone, which lists the name servers for every top-level domain.
- Resolvers contact the root only occasionally, because referrals are cached for a long time.
- The thirteen named root servers are each served from many locations using a routing technique called anycast.
- Several independent organizations operate the root servers, while changes to the root zone follow a separate, coordinated process.
The DNS root servers answer one kind of question above all: "who is in charge of this top-level domain?" When a resolver needs to find a name under .com, .org or a country ending and has no cached lead, a root server tells it which name servers to ask next. The root does not store addresses for individual websites.
There are thirteen root server identities, named by the letters A through M. Behind those thirteen names stands a much larger fleet of machines spread around the world, which is why the top of the DNS tree is far sturdier than the number suggests.
Where the root sits
DNS names form a tree. The root is the single point at the top, written as a lone dot. Directly below it are the top-level domains such as com, net, edu, uk and jp. Below those are registered domains, and below those are whatever names each domain owner creates.
Each level only has to know about the level directly below it. That is what lets the system grow enormously without any server needing a complete list of every name. The overview in DNS explained shows how the pieces fit.
What is in the root zone
The root zone is surprisingly small for something so central. For each top-level domain it holds:
- NS records naming the servers for that top-level domain.
- Glue records, the A and AAAA addresses of those servers, so a resolver can reach them without a circular lookup.
- DNSSEC data that lets a resolver verify the next level's signatures, for top-level domains that are signed.
A referral for .com looks roughly like this when you read it as text:
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
a.gtld-servers.net. 172800 IN A 192.5.6.30 The long time to live (172800 seconds is two days) means a resolver can reuse the referral for a great many lookups before returning.
How a resolver finds the root
DNS cannot be used to find the root, since finding anything depends on already knowing where to start. Resolver software therefore ships with a root hints file: a short list of the root server names and their IP addresses.
When a resolver starts, it picks one of those addresses and asks for the current list of root servers. This is called priming. The answer replaces the built-in hints in memory, so an old copy of the file still works as long as at least some of its addresses are right.
Because of caching, a busy resolver sends only a tiny share of its traffic to the root. Much of what does reach the root is junk: misspelled endings, internal network names that leaked out and queries from misconfigured software. Some resolvers reduce this by using signed proof that a name does not exist to answer similar questions themselves, or by keeping a local copy of the root zone.
Thirteen names, many machines
The limit of thirteen is historical. Early DNS messages sent over UDP were restricted to 512 bytes, and the list of root server names and addresses needed to fit within that size. Modern extensions allow larger messages, but the set of thirteen identities has remained.
What changed is how each identity is deployed. Operators use anycast: the same IP address is announced from many places, and internet routing delivers your query to a nearby one. So k.root-servers.net is one name and one address as far as your resolver is concerned, but many physical installations in reality.
This gives three benefits:
- Speed. A query usually travels to a nearby site instead of across an ocean.
- Capacity. Traffic, including attack traffic, is divided among many locations.
- Resilience. If a site fails and withdraws its route, queries flow to the next one.
You can often see which instance answered you. Many root operators respond to a special identification query:
dig @k.root-servers.net hostname.bind chaos txt +short The reply is a label chosen by the operator, often hinting at a city or site. Not every network allows direct queries to outside DNS servers, so a timeout may only mean your network intercepts or blocks them.
Who runs the root
Two jobs are easy to confuse.
Operating the servers. The thirteen identities are run by a dozen organizations, including universities, companies, nonprofit network bodies and United States government agencies. They run their infrastructure independently and use different hardware and software, so a single bug is less likely to take out everything.
Managing the content. Changes to the root zone, such as a new top-level domain or new name servers for an existing one, go through the IANA functions, which are coordinated under ICANN. The zone is then signed and distributed to all the root operators, who serve the same data. An operator does not edit it independently.
Governance arrangements around these bodies have changed over the years and are a recurring subject of international policy discussion. For current roles, consult IANA and ICANN's own published material.
Trust starts here too
The root is also the anchor for DNSSEC, the system that adds signatures to DNS data. Validating resolvers are configured with the root's public key. The root vouches for the keys of top-level domains, those vouch for the keys of signed domains, and so a chain of verification runs down the tree. Replacing the root's key is a carefully staged operation, because every validating resolver has to learn the new one.
Could the root go down?
An outage of the whole root system would require many independently run, widely distributed installations to fail at once. Large attacks against root servers have happened, and most users noticed little, partly because of anycast and partly because resolvers keep referrals cached for days.
The more realistic problems are local. A network that blocks or rewrites DNS traffic can stop a self-hosted resolver from reaching the root. A resolver with a badly outdated trust key may reject valid answers. And a firewall that drops large UDP replies or blocks DNS over TCP can cause odd, intermittent failures.
If you run your own resolver, keep the software updated, allow both UDP and TCP on port 53 outbound, and confirm the machine's clock is correct, since signature checks depend on it.
Common misunderstandings
A few ideas about the root come up often and are worth correcting.
"All internet traffic passes through the root servers." It does not. Root servers see only DNS questions, only from resolvers that lack a cached referral, and never the web pages, video or mail that follow. Your browsing data does not travel through them.
"Whoever runs a root server can take any website offline." An individual operator serves a zone that is prepared and signed elsewhere. It lists top-level domains, not websites. Removing a single site is a matter for that site's registrar, registry or hosting provider.
"There are only thirteen computers." There are thirteen identities. Each is backed by many machines in many locations, and some run a large number of sites while others run fewer.
"Alternative roots add new endings for everyone." Someone can run a different root with extra endings, but only resolvers configured to use it will see them. For the rest of the internet those names do not exist. This is why a single agreed root matters: it keeps a name meaning the same thing wherever you are.
How a new ending or a server change reaches the root
The root zone changes far less often than an ordinary domain's records, but it does change. When the operator of a country code or another top-level domain wants new name servers, it submits a request through IANA. The request is checked, including whether the new servers actually answer correctly for the zone. Once approved, the change is written into the root zone, the zone is signed again, and the new copy is distributed to the root operators.
Resolvers then pick up the change as their cached referrals expire. Because those referrals live for a long time, a registry moving its servers keeps the old ones working for days after the root is updated. The same overlap principle applies to your own domain at a much smaller scale.
What you can try
To watch the tree being walked from the top, use trace mode on macOS or Linux:
dig +trace www.example.com The output shows the root's referral first, then the top-level domain's, then the final answer from the domain's own servers. The process is explained line by line in what happens during a DNS lookup, and the roles of the two server types in recursive vs. authoritative servers. For more on the endings the root delegates to, see top-level domains explained.