How DNS resolution works: recursive, authoritative and caching
A step-by-step look at a DNS lookup — resolvers, root and TLD servers, authoritative nameservers — and where caching fits in.
On this page
Behind every page load is a DNS lookup that usually takes a few milliseconds. Knowing the steps explains most “it works for me but not for them” problems.
The players
- Stub resolver — the small DNS client in your device.
- Recursive resolver — a server that does the lookup for you, run by your ISP, your router or a public service. It caches answers.
- Root servers — know where each top-level domain’s servers are.
- TLD servers — for
.uk,.comand so on; know each domain’s nameservers. - Authoritative nameservers — hold the real records. For a Traxio-connected domain, ns1.traxio.co.uk and its partners.
A lookup, step by step
For www.yourdomain.co.uk with nothing cached:
- Your device asks its recursive resolver.
- The resolver asks a root server: who handles
.uk? - It asks the
.ukservers: who is authoritative foryourdomain.co.uk? - They answer with Traxio’s nameservers.
- The resolver asks Traxio’s nameserver for
www.yourdomain.co.uk. - The authoritative answer comes back with a TTL.
- The resolver caches it and passes it to your device, which may cache it too.
Caching is why changes take time
Every resolver keeps the answer until its TTL runs out. Change a record and a resolver that looked it up a minute ago keeps using the old value until then. Different resolvers cached at different moments, so the change appears gradually. Why DNS changes take time (DNS propagation)
Authoritative vs recursive answers
When you troubleshoot, ask the authoritative server directly to see the true current record, bypassing caches:
dig @ns1.traxio.co.uk yourdomain.co.uk AIf that shows the new value but your browser doesn’t, the record is right and you’re waiting on caches. How to check DNS records (dig, nslookup and online tools)
Prefer to follow along?
- Diagnose a DNS problem step by step
Advanced · 30 min
Spotted something out of date or unclear? Tell us and we’ll fix it.