DNS: turning names into addresses
How example.org becomes 93.184.216.34, why the first lookup is slow, and what TTL has to do with your deploy.
Machines route by IP address, humans remember names. DNS is the translation layer between them: a distributed database with no single owner, where every domain holder publishes their own records.
Nobody knows the whole map. A recursive resolver walks the hierarchy instead: the root server says "I do not know, ask .org", the .org server says "ask ns1.example.org", and the authoritative server for the domain finally returns the IP. That answer is then cached.
A full hierarchy walk would be far too slow to repeat for every request, so the answer is cached at every level: browser, operating system, resolver. The first lookup of a name takes milliseconds; the next ones are effectively free.
Practice
Order the steps of resolving a name that is not in any cache yet.
Hints
- Whatever is already within reach gets checked first.
- A root server never knows the answer — it only points you further down.
15 XP
You moved the site to a new server, but some users still land on the old one a day later. What is the most likely cause?
Hints
- Resolvers cache an answer for exactly as long as the domain owner allowed.
- Browsers keep their own cache too, and it often outlives the server switch.
12 XP
Build the chain a resolver follows to find the address behind example.org.
Hints
- A name reads right to left: top-level zone first, then the domain, then the host.
- The domain owner registers an NS record that names their authoritative server.
15 XP