The internet's phone book
Who this is for
You know DNS "turns names into IPs," but you've never seen the steps, and you're fuzzy on why DNS changes take a while to take effect.
Computers route by IP address, but humans use names. DNS bridges the two. The clever part is that no single server holds the whole internet. Instead, a recursive resolver walks a hierarchy, each level pointing one step closer, until it reaches the server that actually owns the record.
Watch the lookup
Step through resolving example.com: your device asks a resolver, which asks the root, then the .com servers, then the authoritative server, each handing back a referral until the real IP comes back. Then hit resolve again to see it served instantly from cache.
DNS resolution, step by step
Your device
stub resolver
Recursive resolver
e.g. 8.8.8.8
Root servers
the . at the top
.com TLD
top-level domain
Authoritative
example.com's NS
Step through the walk down the hierarchy, then resolve again to see the cache skip it entirely.
Why it feels instant, and why changes are slow
The full walk happens rarely. Resolvers cache answers for a time set by the record's TTL (time to live), so the vast majority of lookups are served from a nearby cache in milliseconds. That same caching is why DNS changes are not instant.
- First lookup: the full walk, root to TLD to authoritative. Milliseconds, but the most work.
- Repeat lookups: served from cache until the TTL expires. This is the common case.
- Changing a record: old cached answers keep being served until their TTL runs out, which is why you wait after updating DNS.
Pro tip
Practical tip: before a planned DNS change, lower the record's TTL a day ahead. Then when you flip it, the old answer expires from caches quickly and the change propagates fast.
Key takeaways
- DNS turns names into IPs by walking a hierarchy: root, TLD, authoritative.
- A recursive resolver does the legwork; your device just asks it.
- Each level returns a referral until the authoritative server gives the real answer.
- Caching by TTL makes lookups feel instant.
- That same caching is why DNS changes take time, lower the TTL ahead of a change.
Want to go deeper?
This article covers concepts taught hands-on in the Cloud Engineer and DevOps career paths, with real terminal labs, production scenarios, and structured lessons.