How DNS Protects Against DDoS Attacks
A DDoS attack on DNS can take a healthy site offline. See how resilient DNS is built, what it can and cannot absorb, and how to prepare your own domain.
10 min readUpdated Nov 19, 2026By XPASS Editorial Team

A distributed denial-of-service attack, usually shortened to DDoS, tries to make a service unusable by sending it far more traffic than it can handle. Most people picture an attack on a web server. Attackers also aim at DNS, because the lookup that turns a name into an IP address is the very first step of every visit. If the name servers for your domain cannot answer, the website seems to vanish, even though the server behind it never stopped working.
This article explains how attacks on DNS work, the techniques that resilient DNS services use to keep answering, and what you can realistically do for your own domain. It stays general: the aim is to help you ask the right questions about any DNS provider, not to promise that any setup is immune. If you want the business view, the article on DNS uptime and sales impact looks at what a lost lookup costs.
Why DNS is an attractive target
DNS has a few properties that make it a natural focus for attackers.
First, it is a shared dependency. Your website, email, API and apps all start with a lookup, so interrupting DNS interrupts everything at once. Second, most DNS traffic uses UDP, the simple connectionless protocol described alongside the DNS format in RFC 1035. A UDP packet can carry a forged sender address, which makes some kinds of attack easier to launch and harder to trace. Third, answering questions is cheap for a client but takes work for a server, and an attacker can ask millions of questions per second from many machines.
The name servers that hold your records are called authoritative servers. They are public by design, because any resolver in the world must be able to reach them. You cannot hide them behind a login. That is why defence is built from capacity, distribution and filtering rather than secrecy.

The main kinds of DNS-related attacks
It helps to separate the attack styles, because each is countered differently.
Direct query floods
The attacker sends a very large number of valid-looking queries straight to your authoritative servers. Servers spend all their effort answering and real visitors queue behind the noise. Botnets make this simple because each machine sends only a modest amount of traffic and the combined volume is huge.
Random subdomain attacks
Sometimes called a "water torture" style attack, this sends queries for names that do not exist, such as a8f3k.example.com, zz91q.example.com and so on. Because each name is unique, no cache can answer it. Every query travels to your authoritative servers, and recursive resolvers in between also get stressed. The flood is built to defeat caching.
Reflection and amplification
Here the attacker forges the source address of queries so that the replies go to a victim. A short query can trigger a much larger reply, so a small amount of attacker traffic becomes a large amount of victim traffic. The victim can be anyone, and open resolvers that answer anybody have historically been abused for this. Authoritative servers can also be used as reflectors, which is one reason providers limit response sizes and rates.
Attacks on the resolvers your visitors use
Sometimes the target is not your name servers but a large recursive resolver. If a popular resolver is overwhelmed, its users cannot look up anything. Your authoritative servers are fine, yet some visitors see failures. You cannot control this layer, but you can understand it when diagnosing reports that "it works for some people".
Attacks that are not about volume
Not every incident is a flood. Someone who gains control of your registrar or DNS account can change records or name servers, which has the same effect as an attack. Protecting those accounts with strong, unique passwords and two-factor authentication is part of DNS defence too.
How resilient DNS absorbs attacks
No single trick stops DDoS. Resilient DNS combines several layers, each reducing one weakness.
Several name servers on separate networks
A domain should list at least two name servers, and a good setup places them in different networks or locations. Resolvers try the listed servers in turn, as described in RFC 1034, so the loss of one server does not end the lookup. If every server sits in the same data centre or behind the same link, one incident takes them all.
Anycast
With anycast, the same IP address is announced from many locations. Internet routing sends each query to a nearby location, and an attack traffic coming from many places is also spread across many sites instead of hitting one. Each location only has to cope with its own share. If a site is overloaded or fails, routing can move traffic to the next closest one. The article on anycast DNS for global websites explains the idea in more detail.
Capacity and filtering
Providers run DNS servers with a lot of headroom, and put filtering in front of them. Filters can drop obviously malformed packets, limit the response rate to any single source, and recognise patterns such as the random subdomain floods described above. Response rate limiting helps stop a server from being used as a reflector.
Caching at resolvers
Caching is a defence built into DNS. When a resolver has already fetched your record, it answers from memory for the length of the record's TTL, and your authoritative servers see no traffic for it. A visitor who looked up your name a few minutes ago may keep working through a short attack on your name servers. A longer TTL means more resilience to short outages, with the cost that changes take longer to spread.
Careful software and updates
Authoritative DNS software that is current, minimal and hardened has fewer weaknesses to exploit. This is a reason to choose a DNS service that is actively maintained rather than a forgotten server.
Monitoring and response
Providers watch traffic patterns and can adjust filters or routing during an incident. The speed and quality of that response varies between providers, so it is worth asking how it works.
A plain example
Picture an online shop, shop.example, with two name servers from its registrar's basic DNS service, both hosted in the same network. One evening an attacker begins a random subdomain flood against those two servers. Real queries for shop.example start timing out. Customers who visited earlier still reach the shop through cached answers, but new visitors get errors, and after the TTL expires the cached answers disappear as well.
Now compare a second shop whose DNS is served by a provider that uses anycast across many locations, with filtering in front of the servers. The same flood is spread over many sites, filters discard the junk subdomain queries, and legitimate queries keep getting answers. Latency may rise slightly during the peak, but the lookup still works. The shop owner did not have to act during the attack.
Neither shop was "hacked", and neither web server was touched. The difference lies in how the DNS layer was built. That is the point of this article: DNS resilience is an infrastructure choice made before the incident.
What you can do for your own domain
You can improve your position with a few concrete steps.
- List your name servers with
dig NS yourdomain.comand check whether they are on different networks. If they all share one provider, understand that you depend on that provider's resilience. - Ask your DNS provider how it handles attacks: does it use anycast, how many locations, what filtering is applied, what happens during a very large incident, and how you reach support quickly.
- Choose TTLs deliberately. A very short TTL means more traffic reaches your servers and less cache help during an attack; a longer TTL helps cache absorb trouble. Many sites use a balanced value for stable records and a shorter value only before planned changes.
- Protect the registrar and DNS accounts with two-factor authentication, and keep the contact email current. Consider a registrar lock so that the domain cannot be transferred by mistake or by an attacker.
- Keep an exported copy of the zone file so that you can restore records quickly, or move to another provider, if needed.
- Use an external DNS monitor that queries your domain from several places, so that you learn about an outage before customers tell you.
- Write a one-page runbook: who to call, which accounts to log in to, and which checks to run. The article on how to check whether DNS has taken your website down is a useful starting point for the checks.
Does a managed or premium DNS service change the picture?
A DNS service marketed as premium or managed usually offers more name servers, more locations, anycast routing, faster support and sometimes extra features such as health-checked failover. These help with DDoS resilience mostly through distribution and capacity. They do not make a domain invulnerable, and they cannot protect a web server that is itself under attack. Whether the extra investment makes sense depends on how much a lookup outage would cost you. For sites that sell online, the article on Premium DNS for e-commerce discusses that trade-off. For any provider, read what the plan actually includes on the plan page rather than assuming.
Limits and what to watch for
It is important to be honest about what DNS protection can and cannot do.
- It protects the lookup, not the web server. If an attacker floods your website directly, healthy DNS will happily send visitors to a server that cannot cope. Web and network protection is a separate layer.
- Attack sizes vary, and no provider can promise that no attack will ever cause slowness. Be wary of claims of absolute protection.
- Caching hides short outages but also hides your own changes. During an incident, do not panic-edit records: one change at a time, and note the TTL.
- If you use a content delivery network or a reverse proxy, your visible DNS answers may point to that service rather than to your server, and the service handles part of the load.
- DNSSEC protects the authenticity of answers, as in RFC 4033, but it does not stop floods and can even make responses larger. Enable it for integrity, not as an anti-DDoS tool.
- Moving to a new DNS provider during an attack is risky and slow because name server changes themselves depend on caching. Prepare in advance rather than switching in the middle.
- Look at terms, support hours and escalation paths as well as technology. A strong network is less useful if nobody answers when you need help.
Questions to ask any DNS provider
Use this short list when you compare services:
- How many name servers do I get, and are they on different networks?
- Is anycast used, and across how many locations?
- What filtering and rate limiting protect the servers?
- How are very large attacks handled, and will I be told when one affects me?
- Can I export my zone, and is there an API to automate changes?
- What support is available and how quickly can I reach a person?
- What does the plan include, and where is that written down?
Summary
DNS is attacked because everything starts with a lookup and the name servers are public by design. Attackers use direct floods, random subdomain queries and reflection, and they sometimes go after the resolvers visitors use. Resilient DNS answers with several name servers on separate networks, anycast routing, spare capacity, filtering and rate limiting, and with the caching that DNS already provides. You cannot make a domain invulnerable, and DNS protection does not shield your web server, but you can prepare sensibly: spread your name servers, choose TTLs deliberately, secure your accounts, keep a copy of your zone and monitor from outside. To compare DNS and domain options, you can look at the domains page and check what each plan includes.
Frequently asked questions
Why would anyone attack DNS instead of the website itself?
Because DNS is a single point of dependency. If the name servers cannot answer, visitors cannot find the website at all, even when the web server is healthy. A smaller target can therefore cause a large visible outage.
Can DNS completely stop a DDoS attack?
No. Resilient DNS spreads the load, answers from caches and drops abusive traffic, which lets the domain keep answering through many attacks. Very large attacks can still cause degradation, and DNS protection does nothing for the web server itself.
What is the difference between DNS DDoS protection and website DDoS protection?
DNS protection keeps the name lookup working. Website protection filters traffic that reaches your web server. They protect different layers, and a site usually needs both considered separately.
What can I do on my own domain to prepare?
Use more than one name server on separate networks, choose sensible TTLs, keep an exported copy of your zone, monitor DNS from outside your network and decide in advance whom to contact at your DNS provider.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Ready to register your domain?
Search a name, compare extensions and pay once for the years you choose.
.com registration from $18.81 for the first year
Search domainsKeep reading

Domain & DNS Guides
Is Premium DNS Right for an E-commerce Website?
Every order starts with a DNS lookup, and so does every confirmation email. Learn what Premium DNS adds for an online shop, when it is worth it and what it cannot fix.
9 min read

Domain & DNS Guides
How Much DNS Uptime Matters for Website Sales
When DNS stops answering, customers cannot reach your shop even though it is running. See how to estimate the cost of a lookup outage and what to do about it.
10 min read

Domain & DNS Guides
What Is Anycast DNS and How Does It Help Global Websites?
Anycast lets many DNS servers share one address so each visitor reaches a nearby one. Learn how it works, when it helps a global website and what it cannot fix.
9 min read