DNS Explained: The Internet's Phone Book

· Mei-Lin Wu · 9 min read

The Domain Name System (DNS) is the internet's address translation service — the critical infrastructure that converts human-readable domain names like flyfishnwa.com into machine-readable IP addresses like 104.26.10.78. Without DNS, you would need to memorize long numeric addresses for every website you visit. Often called the "phone book of the internet," DNS is one of the oldest and most essential protocols in networking, and it plays a central role in how CDNs route content to users worldwide.

What Problem Did DNS Solve?

Before DNS existed, the early internet (then called ARPANET) used a single text file called HOSTS.TXT to map hostnames to IP addresses. Maintained by the Stanford Research Institute's Network Information Center (SRI-NIC), this file was manually updated and distributed to every connected machine. In the early 1980s, with only a few hundred hosts, this worked — barely.

By 1983, the system was breaking down. The file was growing rapidly, updates took days to propagate, name collisions were common, and the centralized architecture created a single point of failure. If SRI-NIC's server went down, no new name mappings could be distributed. The internet needed a distributed, scalable naming system.

In November 1983, Paul Mockapetris published RFC 882 and RFC 883, defining the Domain Name System. His design was elegant: a hierarchical, distributed database where responsibility for name resolution is delegated across a tree of authoritative servers. No single server holds all answers, but any query can find its way to the right answer by traversing the hierarchy. This architecture has scaled from hundreds of hosts in 1983 to over 350 million registered domains today.

DNS Hierarchy — The domain name system resolves queries by traversing from root servers through TLD DNS Hierarchy — Root servers, TLD servers, and authoritative nameservers DNS Hierarchy Root (.) Servers 13 root server letters (A-M), 1,700+ instances globally .com TLD .org TLD .net TLD Authoritative NS flyfishnwa.com A Record: 104.26.10.78 Recursive Resolver ISP or Public (8.8.8.8) Caches responses by TTL User's Browser Local DNS cache
Figure 1: DNS Hierarchy — The domain name system resolves queries by traversing from root servers through TLD servers to authoritative nameservers

How Does DNS Resolution Work Step by Step?

When you type flyfishnwa.com into your browser, a carefully orchestrated sequence of lookups occurs — typically completing in under 100 milliseconds:

Performance Comparison: Edge vs Origin Processing
Metric Edge Processing Origin Processing Improvement
Latency (p50)8–15 ms120–300 ms15–20x faster
Cache Hit Ratio85–95%N/AReduces origin load
TLS Handshake1–5 ms (nearby PoP)50–150 ms10–30x faster
Bandwidth Cost$0.01–0.04/GB$0.05–0.12/GB3–5x cheaper
Availability99.99% (multi-PoP)99.9% (single DC)10x fewer outages
  1. Browser Cache Check: Your browser first checks its own DNS cache. If you've visited the site recently and the record's TTL (Time to Live) hasn't expired, the IP address is returned immediately — no network request needed.
  2. Operating System Cache: If the browser cache misses, the OS-level DNS resolver (called the "stub resolver") checks its cache. On Linux, this is managed by systemd-resolved; on macOS, by mDNSResponder.
  3. Recursive Resolver Query: If no cached answer exists locally, the query goes to a recursive resolver — typically operated by your ISP or a public service like Google Public DNS (8.8.8.8), Cloudflare DNS (1.1.1.1), or Quad9 (9.9.9.9).
  4. Root Server Query: The recursive resolver contacts one of the 13 root server clusters (labeled A through M). These servers don't know the IP address of flyfishnwa.com, but they know which servers are authoritative for the .com TLD and return a referral.
  5. TLD Server Query: The resolver contacts a .com TLD server (operated by Verisign), which returns the authoritative nameservers for flyfishnwa.com.
  6. Authoritative Server Query: Finally, the resolver contacts the authoritative nameserver for flyfishnwa.com, which returns the actual IP address (the A record for IPv4, or AAAA record for IPv6).
  7. Response Caching: The recursive resolver caches this answer according to the record's TTL (commonly 300 seconds to 86,400 seconds), and returns it to your browser. Future queries from any user on the same resolver skip steps 4-6.

What Are the Most Important DNS Record Types?

Record TypePurposeExample
AMaps domain to IPv4 addressflyfishnwa.com → 104.26.10.78
AAAAMaps domain to IPv6 addressflyfishnwa.com → 2606:4700:20::681a:a4e
CNAMEAlias one name to anotherwww.flyfishnwa.com → flyfishnwa.com
MXMail server for the domainflyfishnwa.com → mail.flyfishnwa.com (priority 10)
NSAuthoritative nameserverflyfishnwa.com → ns1.cloudflare.com
TXTArbitrary text (SPF, DKIM, verification)v=spf1 include:_spf.google.com ~all
SOAStart of Authority — zone metadataSerial number, refresh intervals, TTL defaults
SRVService location (port + protocol)_sip._tcp.flyfishnwa.com → sip.flyfishnwa.com:5060

How Do CDNs Use DNS for Traffic Routing?

DNS is the primary mechanism CDNs use to direct users to the optimal edge server. When a website uses a CDN, its DNS records point to the CDN's infrastructure rather than directly to the origin server. The CDN's authoritative DNS then uses several techniques to select the best edge server:

What Are the Major DNS Security Concerns?

DNS was designed in 1983 without encryption or authentication, creating several security vulnerabilities that persist today:

Modern countermeasures include:

DNS Resolution Flow — The recursive resolver traverses root, TLD, and authoritative servers to resol DNS Resolution Flow — Step-by-step query path from browser to authoritative server Browser DNS Cache Recursive Resolver Root (.) .com TLD Auth NS IP: 104.26.10.78 flyfishnwa.com 1 2 3 4 5 Complete DNS resolution typically takes 20-120ms (uncached)
Figure 2: DNS Resolution Flow — The recursive resolver traverses root, TLD, and authoritative servers to resolve a domain name to an IP address

What Are Common DNS Problems and How to Fix Them?

Several DNS issues frequently affect website operators and CDN users:

External References

References & Standards: HTTP/2 specification · RFC 7234