Course contentsShow
← Computer Science
Lesson 1503 of 2,87235. Application Layer ProtocolsFree lesson

DNS Hierarchy and Namespace Structure

Learning the tree structure of DNS with root, top-level domains (TLDs), second-level domains, and subdomains forming a hierarchical namespace.

DNS Hierarchy and Namespace Structure

You'll learn how DNS organizes domain names into a tree-like hierarchy of root, TLDs, second-level domains, and subdomains forming a structured namespace.

The DNS Tree Structure

DNS doesn't store all domain names in one giant database. Instead, it uses a hierarchical tree structure, much like a family tree or your file system's directory structure.

At the very top sits the root, represented by a dot (.). Every fully qualified domain name technically ends with this root dot, though browsers usually hide it (e.g., www.example.com. is the complete form).

Below the root are Top-Level Domains (TLDs)—these are the familiar suffixes like .com, .org, .edu, or country codes like .uk and .jp. Each TLD is managed by specific organizations.

Beneath TLDs come second-level domains—the names organizations or individuals register. In example.com, "example" is the second-level domain under the .com TLD.

Finally, subdomains can branch off any domain. In mail.google.com, "mail" is a subdomain of google.com. You can nest these further: docs.cloud.google.com shows multiple subdomain levels.

How the Hierarchy Works

Reading right-to-left reveals the hierarchy: blog.support.example.com means:

  • Start at root (.)
  • Go to .com TLD
  • Find example domain
  • Navigate to support subdomain
  • Reach blog subdomain

This structure distributes authority—each level delegates responsibility to the next, preventing any single point of control or failure.

Key Takeaway: DNS uses a hierarchical tree structure with root at top, followed by TLDs, second-level domains, and subdomains, creating a distributed namespace that delegates naming authority at each level.