DDoS protection is a set of defenses that keep a website or service available during a distributed denial-of-service attack, when many compromised devices flood a target with traffic. The most effective approach layers an upstream mitigation service or CDN, a web application firewall with rate limiting, origin protection, and a tested incident response plan.
Key takeaways
- A DDoS attack is a capacity problem: once your link is full, only upstream filtering can help.
- The strongest defense layers a CDN or scrubbing service, a WAF with rate limits, and a hidden origin.
- Prepare before an attack with baselines, a runbook, and provider contacts — you cannot buy protection mid-flood.
Your website is fine one minute and unreachable the next. No error in your code, no server crash — just a flood of traffic from thousands of machines you have never seen. That is a distributed denial-of-service (DDoS) attack, and the time to prepare for one is before it happens.
What is DDoS protection?
DDoS protection is the combination of services, settings and plans that keep your website, app or network reachable while attackers try to flood it offline. It works by absorbing, filtering, challenging or dropping bad traffic before it exhausts your bandwidth, servers or application.
CISA defines a DDoS attack as one in which multiple machines attack one target together, often using a botnet of hijacked internet-connected devices. The goal is simple: make a service unavailable to legitimate users.
Protection is not one product. It is a layered setup: a content delivery network (CDN) or scrubbing service upstream, a web application firewall (WAF) with rate limits, a hidden origin server, and a response plan your team has actually practiced.
How does a DDoS attack work?
An attacker controls many compromised devices — computers, routers, cameras and other connected gadgets — and points them all at one target at the same time. Each device sends traffic that looks ordinary on its own, but together the flood overwhelms the target.
Attackers often spoof source IP addresses, so blocking one address does little. They also use reflection: small requests sent to public servers (such as DNS or NTP servers) that reply with much larger responses aimed at the victim.
Some attacks are pure volume. Others are subtle: a slow trickle of requests that each hold a connection open, or a flood aimed at one expensive page, such as search or login, that exhausts your database instead of your bandwidth.
What are the main types of DDoS attacks?
CISA, the FBI and the MS-ISAC group DDoS attacks into three types: volumetric, protocol-based and application-layer. Each exhausts a different resource, so each needs different defenses.
| Attack type | What it exhausts | Common examples | Main defense |
|---|---|---|---|
| Volumetric | Bandwidth and link capacity | UDP floods, DNS amplification, ICMP floods | Upstream CDN or scrubbing service |
| Protocol-based | Server and firewall connection tables | SYN floods, fragmented packet attacks | Upstream filtering, SYN cookies, connection limits |
| Application-layer (Layer 7) | CPU, memory and database connections | HTTP floods, slow POST, login and search abuse | WAF rules, rate limiting, caching, CAPTCHA |
| Multi-vector | Several resources at once | Volumetric flood plus an HTTP flood | Layered defenses and a managed service |
Many real attacks mix types. A volumetric flood may be the distraction while a quieter application-layer attack targets your login page, so monitor both traffic volume and application health during an incident.
How do you know if you are under a DDoS attack?
The signs are slow performance, a site that will not load, or an inability to reach any website from your network. CISA notes that these symptoms can also come from maintenance or a technical fault, so confirm before you declare an attack.
Check your traffic graphs first. A real attack usually shows a sharp, sustained rise in requests or bandwidth from unusual sources, a spike in errors, or a flood aimed at one endpoint. Compare against your normal baseline for that time of day.
Other clues include a sudden surge in traffic from one country or network, many requests for the same URL, a jump in failed logins, and alerts from your hosting or mitigation provider. Network traffic monitoring is, in CISA's words, the best way to detect an attack.
If your provider is the target instead of you, your site goes down with it. Check your provider's status page before you start changing your own settings.
How to stop a DDoS attack in progress
Act in order: confirm, escalate, filter, then communicate. Panicking and changing many settings at once makes it harder to tell what worked.
- Confirm the pattern. Compare traffic, errors, CPU, bandwidth and database load against your baseline. Rule out a bad release, a cache purge or a crawler surge.
- Call your provider early. Contact your hosting, CDN or mitigation provider and ask them to enable filtering. Provider-side filtering is usually far more useful than anything you can do on your own servers.
- Route traffic through protection. If you already have a CDN or scrubbing service, switch your DNS to it. If not, enable your provider's emergency mitigation and accept that sign-up may take time.
- Rate-limit and challenge. Tighten rate limits on login, search and checkout, and turn on challenge pages for suspicious traffic. Expect some real users to be challenged too.
- Block the worst sources. Block offending IP ranges and networks at the edge, not on your origin. Check each range first with a lookup tool, since reflection attacks come from legitimate public servers.
- Scale and shed load. Add capacity, serve a static version of key pages, and turn off expensive features temporarily.
- Keep records. Save logs, traffic samples and timestamps. You will need them for your provider, your post-incident review and any report to authorities.
Do not pay a ransom. Extortion notes often arrive with a small attack as a demonstration, and paying does not guarantee the attacks stop. Report extortion to the FBI.
How to prevent DDoS attacks
You cannot guarantee you will never be targeted, but you can make an attack expensive for the attacker and short for your users. Prevention is mostly preparation: the right services in place, the origin hidden, and a plan your team can run under pressure.
Put protection in front of the origin
Use a CDN, a reverse proxy, a WAF or a managed mitigation provider for every public website and API. Cloudflare mitigated more than 20 million DDoS attacks in 2024, according to its threat reports — a scale no single organization can match alone.
Hide and restrict the origin IP
If attackers can reach your origin server directly, they can bypass your CDN or WAF entirely. Restrict your origin firewall so it only accepts traffic from your edge provider, load balancer or trusted admin addresses, and never publish the origin IP in DNS.
Rate-limit expensive endpoints
Limit requests by IP, account or token on login, search, checkout and API endpoints. A generous limit for real users still stops a bot from hammering the one page that costs you the most database work.
Cache aggressively where it is safe
Cache static files, images, scripts and public pages so your origin does less work per visitor. A cached page served from the edge costs almost nothing during a flood.
Prepare a runbook before you need it
Write a one-page plan naming who owns DNS, hosting, CDN and firewall access, who calls the provider, and what customer message goes out. CISA recommends a disaster recovery plan covering communication, mitigation and recovery, plus regular patching of network devices.
Which DDoS mitigation services should you compare?
Most small teams need a CDN with built-in mitigation; larger organizations add a dedicated scrubbing service. Compare capacity, Layer 7 controls, and how fast you can switch traffic over in an emergency.
| Service | Best for | Free tier | Strengths |
|---|---|---|---|
| Cloudflare | Small teams and websites | Yes, unmetered mitigation on free plan | Anycast network, WAF, rate limiting |
| Akamai Prolexic | Large enterprises and networks | No | Scrubbing centers, always-on or on-demand |
| AWS Shield | AWS-hosted workloads | Standard included with AWS | Automatic protection, Advanced adds 24/7 response |
| Google Cloud Armor | Google Cloud workloads | No | Adaptive protection, WAF rules, edge policies |
| Fastly | High-traffic sites and APIs | No | Edge delivery, WAF, real-time controls |
Prices for managed mitigation are usually quote-based, so ask each provider for a written quote and test the failover before you sign. The CISA guidance on denial-of-service attacks also recommends enrolling in a protection service before an incident, not during one.
For a small business, the practical starting point is often a CDN free tier plus a WAF. Our small business cybersecurity checklist covers the wider basics, including patching and backups, alongside availability.
What should a small business do about DDoS protection?
Start with the free and cheap layers. Put your public site behind a CDN, turn on its DDoS mitigation and WAF rules, and make sure your origin IP is not exposed. That alone stops most attacks a small site will ever see.
Next, set up monitoring and alerts for traffic spikes, error rates and response times. You cannot respond to an attack you do not notice, and a baseline of normal traffic is what lets you spot the abnormal.
Finally, know who to call. Keep your hosting provider's support number, your DNS login and your CDN dashboard access in one place, and make sure more than one person can reach them. A single point of contact who is on holiday is a common failure.
Check your site's basic security posture too: a quick run of our free security headers checker shows whether your site is configured safely behind its protection layer.
Common DDoS protection mistakes
The most common mistake is buying protection during an attack. Enrollment, DNS changes and allow-listing take time, and attackers do not wait. Set it up when traffic is normal.
- Leaving the origin IP public. One DNS record or old certificate can leak it, and attackers share origin IPs in public lists.
- No baseline. Without knowing normal traffic, you cannot tell an attack from a viral post.
- Rate limits that are too tight. Blocking real users during a sale is its own outage.
- Untested failover. A scrubbing service you have never switched to is a hope, not a plan.
- Ignoring Layer 7. Volumetric protection does nothing against a flood aimed at your login page.
- Forgetting DNS. If your DNS goes down, your site is unreachable even if your servers are fine. Use redundant DNS providers.
What should you do after a DDoS attack?
Once traffic returns to normal, do not just move on. Review what the attack looked like, which controls worked, and which ones failed or were never enabled.
Keep your logs and traffic samples, update your runbook with what you learned, and close the gaps the attack exposed — a leaked origin IP, a missing rate limit, or a provider contact who could not be reached. The joint CISA, FBI and MS-ISAC guide includes post-incident steps and reporting advice.
Report significant attacks to CISA, and report extortion or financial crime to the FBI's Internet Crime Complaint Center. If customer data was affected, follow your breach notification duties as well — an attack is sometimes a distraction from a second intrusion.
The bottom line
DDoS protection is mostly preparation. A CDN or scrubbing service in front of your site, a hidden origin, rate limits on expensive pages, and a runbook your team has practiced will carry you through most attacks.
Set it up this week, while traffic is normal — not during the next flood. Start by checking that your site is properly configured behind its protection layer with the free security headers checker.
Frequently asked questions
What is DDoS protection?
DDoS protection is the set of services and settings that keep a website, app or network reachable when attackers flood it with traffic. It usually combines a CDN or scrubbing service, a web application firewall, rate limiting, and extra capacity upstream of your servers.
How do I stop a DDoS attack in progress?
Confirm it is an attack and not an outage or bad release, then contact your hosting or mitigation provider immediately and switch traffic to your protection service. Enable rate limits and challenge pages, block the worst offending sources, and follow your incident response plan while you monitor.
How can I prevent DDoS attacks?
You cannot guarantee you will never be targeted, but you can reduce the impact. Put a CDN or mitigation service in front of public services, hide your origin IP, rate-limit expensive endpoints, cache aggressively, and keep a tested response runbook ready.
What is the difference between DoS and DDoS?
A denial-of-service attack comes from one source, while a distributed denial-of-service attack comes from many machines at once, usually a botnet of compromised devices. DDoS attacks generate far more volume and are harder to block by IP address alone.
Can a firewall alone stop a DDoS attack?
Usually not. A firewall on your own network only sees traffic after it has already crossed your internet link, so a large volumetric flood fills the link first. Firewalls help with protocol and application-layer attacks, but volumetric attacks need filtering upstream.
How much does DDoS protection cost?
Basic protection is often free or included with a CDN plan, while managed mitigation for larger sites is priced per site or by traffic volume and is usually quote-based. Small sites can start with a free CDN tier and paid WAF rules; larger organizations should budget for a managed service.
What is a DDoS scrubbing service?
A scrubbing service routes your traffic through large filtering centers that drop attack traffic and forward only legitimate requests to your servers. Providers such as Cloudflare, Akamai Prolexic, AWS Shield and Google Cloud Armor use global anycast networks with far more capacity than any single attacker.
Should I report a DDoS attack?
Yes, if it causes real disruption. In the US, report significant attacks to CISA and, where extortion or a crime is involved, to the FBI's Internet Crime Complaint Center. Keep logs and traffic samples, since they help investigators and your provider.
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 CISA's Understanding Denial-of-Service Attacks guidance and the joint CISA, FBI and MS-ISAC DDoS guide.
How we write and fact-check →