A DDoS attack can take a website, game server or online service offline without anyone ever breaking in. It's one of the most common threats on the internet, and one of the most misunderstood.
Here's what it is, how it works, and what you can do about it.
What is a DDoS attack?
DDoS stands for Distributed Denial of Service.
- Denial of service: the goal is to make a service unavailable to real users.
- Distributed: the attack comes from many devices at once, often thousands, spread across the internet.
Those devices are usually part of a botnet: computers, routers, cameras and other internet-connected devices infected with malware and controlled remotely, often without their owners knowing.
How a DDoS attack works
Imagine a small shop. A thousand people who have no intention of buying anything crowd through the door at once. Real customers can't get in. That's a DDoS attack.
Online, the "crowd" is traffic. Attackers try to exhaust one of three things:
1. Network capacity (volumetric attacks)
The attack sends more data than the network connection can carry, like water overwhelming a pipe. Even a fast server is useless if its connection is saturated.
2. Server or network equipment resources (protocol attacks)
These exploit how network protocols work. For example, they open huge numbers of half-finished connections, exhausting the server's or firewall's ability to track them.
3. Application resources (application-layer attacks)
These send requests that look legitimate, such as loading a search page or a login form, over and over. Each request makes the server do real work, like running PHP or querying a database, so even modest traffic can overwhelm it. They're harder to spot because each request looks normal.
Why would anyone attack my site?
Common motives include:
- Competition, especially for game servers and online stores
- Extortion, demanding payment to stop
- Grudges, activism or mischief
- Distraction, to cover another attack
- Collateral damage, when an attack aimed at someone else hits a shared network
You don't have to be a big company to be targeted. Attack services are cheap and easy to rent.
DDoS vs a traffic spike
Not every surge is an attack. A post going viral, a sale or a mention in the news can bring a flood of real visitors. The difference:
- Real spikes come from many normal users, on normal pages, with normal behavior, and often bring sales or signups.
- Attacks often target one URL repeatedly, come from unusual sources, or show strange patterns.
Either way, caching and good capacity planning help. See hosting resource limits explained.
How DDoS protection works
DDoS mitigation filters traffic before it reaches your server. Network-level protection:
- Detects unusual traffic patterns
- Diverts traffic through filtering systems with much more capacity than any single server
- Drops attack traffic and passes legitimate traffic through
This is why DDoS protection needs to happen at the network level, before traffic reaches your server. A firewall on the server itself can't help once the connection is already full.
Some hosts include DDoS protection as standard on servers. Others sell it as an add-on. Check before you buy.
What you can do yourself
Network-level protection handles big floods. You can add layers that help against smaller and application-level attacks:
- Use caching. A cached page costs the server almost nothing to serve. On a LiteSpeed server, use LiteSpeed Cache. See speed up WordPress with LiteSpeed Cache.
- Rate-limit expensive pages, such as login, search and cart, with a security plugin or web server rules.
- Protect login pages with login attempt limits and CAPTCHAs.
- Consider a CDN or web application firewall in front of your site. See what is a CDN?
- Keep your server's real IP private if you use a proxy. Don't expose it through DNS records like old A records for subdomains.
- On a VPS or dedicated server, use a firewall to close every port you don't need.
What to do during an attack
- Confirm it's an attack, not a traffic spike or a broken plugin. Check your logs or traffic stats.
- Contact your host with what you're seeing, when it started and which services are affected.
- Don't pay ransom demands. Paying doesn't guarantee the attack stops, and marks you as a willing payer.
- Communicate with your customers if the outage is noticeable.
- Review afterwards: which defenses helped, and what you'd add.
A note on uptime guarantees
Most hosting uptime guarantees exclude DDoS attacks, because they're caused by third parties. Read what is uptime? for how guarantees work.
A null-route is when a network temporarily drops all traffic to an IP address under very heavy attack, to protect everyone else on the network. It takes the target offline for a while, but stops the attack affecting other customers.
The bottom line
A DDoS attack floods your service with traffic to knock it offline. Protection has to happen at the network level, so choose hosting that includes it if you run anything that could be targeted. Add caching, rate limiting and a firewall on your side, and have a plan for what to do if an attack happens.