Fundamentals 9 min read

How DNS Resolves Domain Names: A Step‑by‑Step Guide

This article explains the DNS architecture—from root, top‑level, and local servers—to the nine‑step resolution process, covering record types, TTL, GTM, CDN caching, and how a user's request ultimately reaches the application server.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How DNS Resolves Domain Names: A Step‑by‑Step Guide

During a recent interview the author was asked about the DNS request process, prompting a detailed review of DNS definitions, structure, and resolution principles.

DNS Meaning and Structure

IP addresses identify servers, but because they are hard to remember, domain names are used instead. The Domain Name System (DNS) maps domain names to IP addresses via a distributed database.

DNS hierarchy consists of three layers:

Root DNS servers (ROOT) store addresses of top‑level domain (TLD) servers.

TLD servers (gTLD, ccTLD, New gTLD) hold authoritative DNS information for second‑level domains.

Local DNS servers (often operated by ISPs) cache recent lookups and serve nearby clients.

gTLDs are generic top‑level domains such as .com, .net; ccTLDs are country code domains like .cn, .jp; New gTLDs include newer extensions such as .xyz, .top.

DNS hierarchical structure diagram
DNS hierarchical structure diagram

DNS Resolution Principle

The resolution process can be illustrated in nine steps, simplifying the back‑and‑forth communication between the client and various DNS servers.

User enters a URL (e.g., www.51cto.com). The browser first checks its cache for a matching IP.

If not cached, the local hosts file is consulted for static mappings.

When still unresolved, the request is sent to the Local DNS server (ISP‑provided), which often satisfies the query from its cache (about 80% of cases).

If needed, the Local DNS queries a Root DNS server to obtain the address of the appropriate TLD server.

The TLD server returns the address of the domain’s authoritative Name Server.

The Name Server provides the domain’s A record (IP) or CNAME record and sets a TTL.

If a CNAME is returned, the client follows it to the final A record, often passing through a Global Traffic Manager (GTM).

GTM directs the request to the optimal CDN edge node based on proximity and health.

For dynamic content not cached by the CDN, the request reaches the application server via a load balancer.

Full DNS resolution flow diagram
Full DNS resolution flow diagram
A (Address) record maps a hostname to its IP address.
CNAME (Canonical Name) record creates an alias, allowing multiple names to point to a single domain.
TTL (Time To Live) defines how long a DNS record is cached before it must be refreshed.

GTM (Global Traffic Manager) provides real‑time fault‑tolerance and global load balancing, ensuring users connect to the nearest, healthiest server. Combined with CDN caching, this improves performance for static assets, while dynamic requests continue to the application server.

Conclusion

DNS servers translate URLs to IP addresses through a three‑tier hierarchy: Root, TLD, and Local DNS. The full resolution path involves the browser, hosts file, Local DNS, Root DNS, TLD servers, authoritative Name Server, GTM, CDN, and finally the application server, encompassing nine distinct steps.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DNSDNS ResolutionDomain Name SystemInternet fundamentals
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.