DNS Untangled - Recursive vs Authoritative | Roei Amsalem DNS Untangled - Recursive vs Authoritative | Roei Amsalem

Recursive vs Authoritative — the query lifecycle

The cast

Role What it does Example
Stub resolver Client-side; asks one configured resolver, waits. Zero legwork OS built-in (systemd-resolved, Windows DNS Client)
Recursive resolver Walks the hierarchy, caches, returns final answers Enterprise BIND, ISP resolver, 1.1.1.1
Forwarder Relays to a real resolver upstream; caches; no tree-walking Home gateway, branch DNS
Authoritative Answers only from its own zones: answer / referral / NXDOMAIN. Never goes looking Roots, TLDs, a domain’s NS

The rules

  1. Recursion is a configured service, not a reflex (recursion yes; in BIND → server advertises RA). Roots/TLDs have it off by design, forever.
  2. Every level knows only its own zone. Nobody holds the full map; the complete answer emerges from the resolver stitching referrals together.
  3. A referral IS an authoritative answer — delegation records from the server’s own zone. Referral ≠ recursion.
  4. Jurisdiction rule: NXDOMAIN may only be declared for names inside the answering server’s zone. Fake TLD → root says it. Unregistered .com → TLD says it. Missing subdomain → only the domain’s own servers say it.
  5. Hub, not chain. The resolver originates every query. Root/TLD/authoritative never talk to each other; the authoritative only ever sees resolver IPs.
  6. The resolver caches everything — answers AND referrals — so full walks are rare.
  7. An authoritative server matches the deepest suffix it has data for, then answers/refers/denies. That’s all it ever does.

Lifecycle (nothing cached)

stub → resolver:            "A for app.example.com?" (RD=1)
resolver → root:            referral: ".com is delegated to these servers"
resolver → .com TLD:        referral: "example.com → ns1/ns2.exampledns.net"
resolver → ns1:             ANSWER (aa): app.example.com A 203.0.113.10, TTL 300
resolver → stub:            the IP (cached for next time)

RD / RA — two independent switches

RA RD Result
yes 1 full recursive lookup
yes 0 cache-only answer (cache-inspection trick)
no 1 own-data/referral anyway; RD ignored
no 0 own-data only — ground truth, belt and suspenders

THE troubleshooting move

users' view
dig www.example.com +short

What users currently see — the resolver's cached answer.

ground truth
dig @ns1.example.com www.example.com +short +norecurse

What the zone actually contains. Straight to the authoritative, every cache bypassed.

Disagree → stale caches (TTL problem): wait or flush. Agree but wrong → the zone data is wrong: fix the record. One pair of commands halves the problem space.