DEV Community

Blake K
Blake K

Posted on • Updated on

DNS Explained. Hierarchy and Architecture

This is an article in the DNS Explained. series. Click here to read the introduction post.

In the first post for this series, I described DNS being both hierarchical and decentralized. In this post, we will dive into what that really means.

DNS is Hierarchical

Hierarchy is obtained through levels of domains, starting at the root server (represented by a period ".").

A tree showcasing the levels of domains that DNS provides.

You may have heard of top-level domains (TLDs) before. Some examples of TLDs include:

  • .com
  • .net
  • .org
  • .us
  • .de
  • .coffee
  • .ninja

They are called top-level domains because well, they are at the top level (excluding the root)! Organizations can register second-level domains under any valid TLD.

Because DNS is hierarchical, that means that two separate second-level domains can both use the same third-level domain For example, and are both allowed because the uniqueness of the third level domain is limited to the scope of the second-level domain. This was not possible under the predecessor hosts.txt system.

Root Zone Servers

In the above graphic, I introduced a new DNS concept called the root server. The root is the base of the DNS hierarchy tree. While I described it as a single point, it is actually more than that.

In reality, the root server is called the Root Zone servers. It's called the Root Zone because there are actually 13 Root servers. These servers are spread out geographically and are the starting place for traversing DNS via resolution.

ICANN appoints operators for these 13 root servers. There are 12 total operators.

Host name IP Addresses Operator, 2001:503:ba3e::2:30 Verisign, Inc., 2001:500:200::b University of Southern California, Information Sciences Institute, 2001:500:2::c Cogent Communications, 2001:500:2d::d University of Maryland, 2001:500:a8::e NASA (Ames Research Center), 2001:500:2f::f Internet Systems Consortium, Inc., 2001:500:12::d0d US Department of Defense (NIC), 2001:500:1::53 US Army (Research Lab), 2001:7fe::53 Netnod, 2001:503:c27::2:30 Verisign, Inc., 2001:7fd::1 RIPE NCC, 2001:500:9f::42 ICANN, 2001:dc3::35 WIDE Project

You may be asking yourself, how do hosts and resolvers know about these 13 root servers? The answer is simple: they're hardcoded!

You can view the locations of all the root zone servers here.

DNS is Decentralized

This hierarchical structure of domain levels permits decentralization too. DNS is decentralized in terms of not a single party is responsible for providing the nameservers at each level.

A tree showcasing the different name server operators.

At each second-level domain, there are a set of nameservers. These nameservers are used during resolution to provide the IP addresses of third+ level domains within the scope of that specific second-level domain.

Since the scope is limited to that particular second-level domain, the registry of the TLD does not need to operate this, and instead, the responsibility is given to the second-level domain registrant to provide this functionality.

If the domain registrant does not want the responsibility of providing their own nameservers, there exist third-party companies that offer managed DNS services. Cloudflare is one of the largest managed DNS providers. Most registrars also offer this service.


We can make a few observations about DNS from the fact that it is both hierarchical and decentralized.

Firstly, DNS is scalable due to its hierarchy. By having "zones" of TLDs, the infrastructure for each zone can be spread out and independently scaled. This is great because some TLDs have more registrations than others.

Secondly, since the hierarchy begins with the root, and the root is represented by a period, the fully qualified domain name (FQDN) technically ends with a period too. This is official and was documented in RFC 1034. You can try it out in your browser and verify that it still works:


Finally, FQDNs are parsed from right to left. This is because the root starts on the right-hand side, and the lowest level is on the left-hand side.

Top comments (0)