A recursive DNS server, also called a DNS resolver, is a server that takes a domain name from your device and finds its IP address for you. It checks its cache first, then queries root, top-level domain and authoritative name servers in turn until it has a final answer, which it returns to your device and caches for next time.
Key takeaways
- A recursive DNS server does the asking: it walks the DNS hierarchy on your behalf until it finds a domain's IP address.
- Caching is what makes it fast — a cached answer is returned in milliseconds, while a full lookup takes several queries.
- An open recursive resolver is a security risk: it can be abused for DNS amplification attacks and cache poisoning.
You type a website name, press Enter, and the page loads. Between those two moments, a recursive DNS server did a surprising amount of work: it checked its memory, asked up to three other servers, and returned the one number your browser needed. Without it, the internet would be unusable.
What is a recursive DNS server?
A recursive DNS server is a server that finds the IP address for a domain name on your behalf. Your device asks it one question, and it keeps asking other DNS servers until it has a final answer to return.
It is usually called a DNS resolver, and that name describes the job better. When your laptop, phone or office router needs to reach example.com, it does not know the IP address. It sends the question to the resolver configured on your network — usually run by your internet provider, your employer, or a public DNS service.
The resolver then does the "recursion": it walks down the DNS hierarchy, server by server, until it reaches the server that actually holds the answer. RFC 1034, the document that defined the Domain Name System in 1987, describes the two approaches exactly this way: in the recursive approach, the first server pursues the query for the client at another server, while in the iterative approach the server refers the client onward and lets the client pursue the query itself.
Almost every device you own uses recursive DNS all day, every day. Your operating system has a small stub resolver built in. It does no walking at all — it simply forwards your question to the configured recursive server and waits for the answer.
How does a recursive DNS server work?
A recursive lookup follows the same steps every time: check the cache, ask the root, ask the top-level domain server, ask the authoritative server, then return and cache the answer.
Here is the walk in detail, using www.example.com as the example:
- Your device asks the resolver. The stub resolver in your operating system sends the query to the configured recursive server, usually over UDP port 53.
- The resolver checks its cache. If someone recently asked for the same record and its time-to-live has not expired, the resolver answers immediately from memory. Most real-world queries end here.
- On a cache miss, it asks a root server. The root does not know the address for
www.example.com, but it knows which servers run.com, so it returns a referral to them. - It asks the .com TLD server. That server returns a referral to the authoritative name servers for
example.com. - It asks the authoritative server. This server holds the actual record and returns the IP address, together with a TTL.
- The resolver caches the answer and returns it. Your device can now connect to the website. The next person who asks gets the cached answer in milliseconds.
Notice who does the work: your device asked one server once. The resolver made every other query. That delegation is the whole point of recursion, and it is why a laptop never needs to know how the DNS hierarchy is organized.
Recursive vs iterative DNS: what's the difference?
In a recursive query, the resolver does all the chasing and returns a final answer. In an iterative query, each server returns a referral to the next server, and the client does the chasing itself.
The practical difference is who carries the burden. Recursive queries are easier on the client and faster in practice, because the resolver caches answers and serves many users. Iterative queries put the work on the client, which is why ordinary devices and browsers never use them directly — but the queries a recursive resolver sends to root, TLD and authoritative servers are themselves iterative. The resolver asks each one, gets a referral, and moves on.
RFC 1034 notes that the DNS requires servers to support the iterative approach, while recursion is an option a server may offer. In practice, resolvers that serve end users offer recursion, and authoritative servers generally do not: an authoritative server that accepted recursive queries from anyone would be doing unpaid work for the whole internet, and opening itself to abuse.
Cloudflare puts it plainly: in a recursive lookup, the client tells the resolver to hunt the answer down and not come back until it has it. In an iterative lookup, the client asks each server for the address of the next one and looks it up itself.
Recursive vs authoritative DNS: what's the difference?
Recursive and authoritative servers are opposite halves of the same system. One asks questions, the other holds answers — and a lookup needs both.
| Server type | What it does | Who it serves | Example |
|---|---|---|---|
| Recursive resolver | Chases a name through the hierarchy until it finds a final answer; caches results | End users and their devices | Your ISP's resolver, Cloudflare 1.1.1.1, Google 8.8.8.8 |
| Root server | Refers queries to the right TLD server; knows nothing about individual domains | Resolvers | One of the 13 root server identities, run by 12 operators |
| TLD server | Refers queries to the authoritative servers for a domain under its extension | Resolvers | The .com, .org or .co.uk name servers |
| Authoritative server | Holds the actual DNS records for its zones and gives final answers | Resolvers (and anyone asking about its domains) | A domain owner's name servers, or their DNS provider's |
The confusion usually comes from the word "DNS server" being used for all four. When a guide says "change your DNS server", it means the recursive resolver — the only one of the four your device talks to directly. When a guide says "update your DNS records", it means the authoritative server, because that is where the records live.
A single physical machine can play more than one role, but the roles stay distinct. A large provider may run both recursive resolvers for its customers and authoritative servers for domains it hosts, on separate systems with separate policies.
What does a recursive DNS server cache, and for how long?
A recursive resolver caches every answer it receives, for exactly as long as the record's time-to-live (TTL) allows. The TTL is set by the domain owner on the authoritative server, and the resolver must honor it.
Caching is the reason recursive DNS feels instant. The first person to ask for an obscure domain triggers the full walk to the authoritative server. Everyone after that gets the answer from the resolver's memory until the TTL expires. Popular domains are therefore answered in single-digit milliseconds, and the load on root and TLD servers stays manageable.
TTL values are a tradeoff the domain owner controls. A short TTL, such as 60 seconds, means changes propagate fast — useful when you are migrating a website or failing over between servers. A long TTL, such as a day, means faster answers and less load, but a stale address can linger for hours after a change.
This is also why a DNS change can seem to take effect at different times for different people. Your device, your router, your ISP's resolver and your browser each cache answers with their own timers. If a site moved servers and you still reach the old one, flushing your local DNS cache or waiting out the TTL usually fixes it. You can check what the world currently sees for a domain with our free DNS lookup tool.
What are the security risks of recursive DNS?
The main risks are open resolvers, cache poisoning and eavesdropping. All three are well understood, and all three have standard fixes — but only if the resolver is configured correctly.
Open resolvers and DNS amplification
A resolver that accepts recursive queries from anyone is an open resolver, and it is a weapon waiting to be picked up. In a DNS amplification attack, the attacker sends a flood of small queries with a spoofed source address — the victim's address — and asks for very long responses. The resolver dutifully sends large replies to the victim, flooding it with traffic it never asked for.
This is a form of distributed denial-of-service attack, and it only works because the resolver answers strangers. The fix is simple and non-negotiable: a recursive resolver must only serve its own users or network. If you run a DNS server, check that recursion is restricted, and never expose a resolver to the whole internet.
DNS cache poisoning
In a cache poisoning attack, an attacker tricks the resolver into accepting a fake answer — typically the address of a malicious site — in place of the real one. The resolver then caches the fake record and serves it to every user who asks for that domain until the TTL expires.
Modern resolvers defend against this with randomized source ports and transaction IDs, which make forged replies far harder to land, and with DNSSEC validation, which lets the resolver cryptographically check that an answer really came from the authoritative server and was not altered in transit. If your domain matters, sign it with DNSSEC: it is the only defense that makes poisoning cryptographically impossible rather than merely difficult.
Eavesdropping and encrypted DNS
Classic DNS travels in plain text, so anyone on the network path — a public Wi-Fi operator, an ISP, or an attacker on the same network — can see which domains you look up and can interfere with the answers. Encrypted DNS fixes this: DNS over TLS (DoT, port 853) and DNS over HTTPS (DoH, port 443) encrypt the query between your device and the resolver.
Encryption protects the link to the resolver, not the resolver itself — the resolver still sees every query, so choose one you trust. Most modern browsers and operating systems now offer DoH or DoT as a setting, and enabling it is one of the easiest privacy wins available.
How do you change your recursive DNS server?
You change your resolver in your operating system or router settings, by replacing the DNS server addresses with the ones your chosen provider publishes. The change takes effect immediately for new lookups.
On Windows, it is under network adapter settings; on macOS, under System Settings and then Network; on Linux, in the network manager or systemd-resolved configuration; on a router, in the DHCP or DNS settings, which then applies the new resolver to every device on the network. Changing it on the router is the simplest way to cover a whole household or office at once.
Popular public resolvers include Cloudflare's 1.1.1.1, Google's 8.8.8.8, and Quad9's 9.9.9.9, which adds malicious-domain blocking. Before switching, check that the provider supports DNSSEC validation and encrypted DNS, and read its privacy policy: your resolver sees every domain you visit. If a site still will not load after a switch, the problem is usually a stale local cache — flush it, or wait a few minutes.
For a business, the choice matters more. A company resolver can block malicious domains for every employee, log lookups for incident investigation, and enforce policy — which is exactly what protective DNS services do. Our DNS and domain security platform covers this alongside domain monitoring.
The bottom line
A recursive DNS server is the part of DNS you actually use. It takes one question from your device, walks the hierarchy from root to authoritative server, caches the answer, and hands it back — usually in milliseconds.
Use a resolver you trust, make sure it validates DNSSEC, turn on encrypted DNS where you can, and never run an open resolver. You can check how your own domain's DNS is set up right now with the free DNS lookup tool.
Frequently asked questions
What is a recursive DNS server in simple terms?
It is the server your device asks when it needs to turn a domain name like example.com into an IP address. Instead of making your device chase the answer through several servers, the recursive server does all the chasing itself and hands back one final answer.
Is a recursive DNS server the same as a DNS resolver?
Yes. The two terms describe the same thing. Resolver is the common name for the software and service, while recursive DNS server describes its role in the DNS system: it performs recursion on behalf of the client.
What is the difference between recursive and authoritative DNS?
A recursive server asks other servers until it finds an answer, and it answers queries for any domain. An authoritative server holds the actual DNS records for the domains it owns and only answers for those domains. The recursive server ends its search at the authoritative server.
What happens if a recursive DNS server goes down?
Your device cannot resolve new domain names, so websites, email and apps stop loading even though your internet connection is fine. Cached answers on your device may keep recently visited sites working briefly, but anything new fails until the resolver returns or you switch to another one.
Should I use my ISP's resolver or a public one?
Either works, and the best choice depends on your priorities. Your ISP's resolver is usually closest and fastest. Public resolvers such as Cloudflare's 1.1.1.1 or Google's 8.8.8.8 can be faster in some locations and often add DNSSEC validation and encrypted DNS options.
Is recursive DNS safe?
Recursive DNS itself is a normal, essential part of the internet. The risk comes from resolvers that are open to anyone on the internet, which attackers abuse for amplification attacks and cache poisoning. A resolver that only serves its own users, validates DNSSEC and supports encrypted DNS is the safe setup.
What port does a recursive DNS server use?
Traditional DNS queries use UDP port 53, with TCP port 53 for larger responses and zone transfers. Encrypted variants use different ports: DNS over TLS uses port 853, and DNS over HTTPS runs over port 443 like normal web traffic.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against RFC 1034 and Cloudflare's recursive DNS documentation.
How we write and fact-check →