How DNS Works Step by Step: From Typing a Domain Name to Loading a Page
In the milliseconds after you press Enter on a web address, your device completes a rapid multi-server lookup. Here is a clear breakdown of DNS resolution and TTL caching.
The Phonebook of the Internet
Humans remember readable names, while routers only deliver packets to numeric IP addresses.
Every website and server lives at a numeric IP address, yet nobody wants to memorize strings of numbers for every site they visit. The Domain Name System (DNS) translates human-friendly domain names into IP addresses automatically in milliseconds.
The 4 Steps of a DNS Lookup:
- Local Cache Check: Your browser, operating system, and router first check if they already cached the IP from a recent visit.
- Recursive Resolver: If not found, the request goes to your configured DNS resolver, which handles the search on your behalf.
- Root & TLD Servers: The root server points the resolver toward the right top-level domain server (such as .com or .org).
- Authoritative Nameserver: The domain's authoritative server returns the exact IP address, which gets cached locally so the page loads.
# Inspect DNS resolution and TTL from your terminal
nslookup example.com
dig +short example.com AWhat Is TTL—and Why Do DNS Changes Take Time?
Caching keeps the web fast, but it also means old records linger until their timer expires.
Every DNS record includes a Time To Live (TTL) value measured in seconds. It tells resolvers how long to keep a cached answer before asking again. Longer TTLs speed up everyday browsing, while lowering TTL ahead of a server migration ensures updates propagate smoothly.
Understanding DNS solves half of all 'site won't load' mysteries before you even touch your router.