Lesson 2 of 3
How DNS resolution works
2 min
DNS (Domain Name System) is the internet's phone book. When you type a domain, your device needs its IP address before it can connect.
The lookup, step by step
- Your device asks a recursive resolver, usually run by your ISP or a public service such as
1.1.1.1or8.8.8.8. - If the resolver doesn't already know the answer, it asks a root server, which points it to the servers for the TLD (for example
.com). - The TLD servers point it to the domain's authoritative nameservers, the ones listed at your registrar.
- The authoritative server returns the actual record, for example the
Arecord with the IP address. - The resolver hands the answer back to your device and caches it.
TTL and caching
Every record has a TTL (time to live) in seconds. Resolvers keep the answer for that long before asking again. This is why DNS changes don't appear everywhere at once: some resolvers still hold the old answer until its TTL runs out.
Planning a migration? Lower the TTL to 300 seconds a day before the move, then raise it again afterwards.
Try it yourself
dig insidx.com
dig +trace insidx.comThe first shows the answer; the second walks the whole chain from the root servers down.