What is a DNS Resolver?
Learn what a DNS resolver is, how recursive resolution works, caching by TTL, and how it differs from authoritative servers.
Expected Interview Answer
A DNS resolver (or recursive resolver) is the DNS server component that takes a client’s hostname lookup request and does the work of walking the DNS hierarchy — root, TLD, and authoritative servers — on the client’s behalf, returning a final answer instead of leaving the client to make each query itself.
When an application asks to resolve example.com, it typically sends a single recursive query to a configured resolver (an ISP resolver, a router’s local resolver, or a public one like 1.1.1.1 or 8.8.8.8). That resolver then performs the iterative work: it asks a root server which TLD server handles .com, asks that TLD server which name servers are authoritative for example.com, and finally asks one of those authoritative servers for the actual A or AAAA record, caching the result according to its TTL along the way. This division of labor — recursive resolver vs authoritative server — means the client only ever makes one request and one round trip, while the resolver absorbs the complexity and caches answers to speed up future lookups for other clients. A stub resolver (built into an OS) is not the same thing — it just forwards the client’s query to a full recursive resolver rather than walking the hierarchy itself. Recent additions like DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt the client-to-resolver leg of this exchange for privacy.
- Absorbs the multi-step DNS hierarchy walk so clients make one simple request
- Caches answers by TTL, speeding up repeat lookups for all its clients
- Separates the recursive-resolution role from authoritative-server responsibility
- Can be secured client-side with DNS over HTTPS/TLS for privacy
AI Mentor Explanation
A DNS resolver is like a team’s video analyst who, when a captain asks 'what’s this bowler’s economy against left-handers,' does all the legwork of checking multiple stat databases and match archives instead of making the captain dig through records personally. The captain asks once, and the analyst walks through several reference sources before coming back with a single clear answer, caching that stat in their notes for the next time it’s needed. The captain never has to know which archive actually held the number, only that the analyst got it. This one-request, multi-step-lookup pattern is exactly what a DNS resolver does for a client asking to resolve a hostname.
Step-by-Step Explanation
Step 1
Client query
An application sends one recursive query for a hostname to its configured resolver.
Step 2
Root lookup
The resolver asks a root server which TLD server is responsible for the domain's top-level domain.
Step 3
TLD and authoritative lookup
The resolver asks the TLD server, then the authoritative name server, for the actual record.
Step 4
Answer and cache
The resolver returns the final answer to the client and caches it locally according to its TTL.
What Interviewer Expects
- Explains a recursive resolver walks root -> TLD -> authoritative servers on the client's behalf
- Distinguishes a recursive resolver from an authoritative name server
- Knows the resolver caches responses using record TTLs
- Aware of DoH/DoT as encryption for the client-to-resolver leg
Common Mistakes
- Confusing a recursive resolver with an authoritative server
- Thinking the client walks the DNS hierarchy itself
- Not knowing stub resolvers (OS-level) just forward to a full resolver
- Forgetting caching is what makes repeat lookups fast
Best Answer (HR Friendly)
“A DNS resolver is the part of the DNS system that does the legwork when your device asks 'what’s the address for this website name?' Instead of your device having to talk to a chain of different servers itself, it asks one resolver, which goes and finds the answer through however many steps that takes, then hands back a single clean result — and remembers it for a while so the next lookup is instant.”
Code Example
# Query using a specific recursive resolver
dig @1.1.1.1 example.com A
# Trace the full resolution path from root to authoritative server
dig +trace example.com
# Check the TTL the resolver is caching this answer for
dig example.com A | grep -A1 "ANSWER SECTION"Follow-up Questions
- What is the difference between a recursive resolver and an authoritative name server?
- How does DNS caching and TTL affect resolver performance?
- What is a stub resolver and how does it differ from a full recursive resolver?
- How do DNS over HTTPS (DoH) and DNS over TLS (DoT) protect resolver queries?
MCQ Practice
1. What is the primary job of a DNS recursive resolver?
A recursive resolver performs the multi-step lookup through root, TLD, and authoritative servers so the client only makes one request.
2. What lets a resolver avoid repeating the same lookup immediately after answering it once?
The resolver caches responses for the duration of the record's TTL, speeding up subsequent identical lookups.
3. What is a stub resolver?
A stub resolver is the lightweight OS component that forwards a client's query to a full recursive resolver rather than resolving it itself.
Flash Cards
What is a DNS resolver? — A server that walks the DNS hierarchy on a client's behalf and returns a final answer.
Resolver vs authoritative server? — A resolver looks up answers recursively; an authoritative server holds the actual zone data.
What is a stub resolver? — An OS-level component that forwards queries to a full recursive resolver.
What secures resolver queries? — DNS over HTTPS (DoH) or DNS over TLS (DoT).