Learning objectives
After reading this article you will be able to:
- Understand the four ways DDoS protection is billed
- Know what drives the price up: layer 7, bandwidth and a response team
- Estimate what going without protection costs during an attack
Search for the price of DDoS protection and you find two extremes: CDNs that include mitigation on every plan and enterprise subscriptions with a one-year commitment. Both exist because they sell different things. The useful question is which layers you need filtered, who answers when the attack starts and who pays the extra bill the attack creates.
The numbers in this article are hypothetical, picked to keep the math simple. They are not any provider's prices; real figures live on the official pages listed in the sources. If the concept is new to you, start with what a DDoS attack is.
How is DDoS protection billed?#
Almost every offer falls into one of four models.
- Included with hosting or a CDN. Mitigation comes with the service and has no line of its own on the bill. Cloudflare describes unmetered, unlimited DDoS protection for all customers on all plans. AWS applies Shield Standard to every customer at no additional cost, with nothing to enable.
- Per plan or subscription. A fixed monthly amount, often with a commitment. AWS Shield Advanced requires a one-year subscription, with a monthly fee plus a usage fee based on data transfer out. Azure DDoS Network Protection charges a fixed monthly amount that covers up to 100 public IPs, with an overage per IP; Azure DDoS IP Protection charges per protected IP. Cloud Armor Enterprise has a monthly per-project option and an annual one with a 12-month commitment.
- Usage-based. The bill grows with what passes through the protection: requests evaluated, active rules or GB delivered. Cloud Armor Standard, for example, charges per policy, per rule and per request. Scrubbing services, which take all your traffic and hand back only the legitimate part, are usually quoted by the clean bandwidth they deliver.
- On demand. Buying in the middle of an attack. You negotiate in a hurry, the DNS or routing change takes time to apply and, meanwhile, the service stays down.
What drives the price up?#
Layer 7#
Volumetric attacks (layers 3 and 4) are filtered by network capacity: whoever has bandwidth to spare drops the junk before it reaches the server. At layer 7, each request looks legitimate, and separating abuse means inspecting the content, applying rules and challenging suspicious clients. That costs processing per request, so advanced layer 7 protection is usually billed per request or reserved for higher tiers. Cloud Armor Enterprise, for example, unlocks full Adaptive Protection, which uses machine learning to detect application-layer attacks (on Standard, it only raises alerts). This is where a WAF comes in, covered in how much a WAF costs.
Bandwidth and number of resources#
In usage-based models, more protected traffic means a bigger bill. The Shield Advanced usage fee is based on data transfer out from protected resources, and the Azure network plan caps the IPs included. Protecting ten sites costs more than protecting one.
Response team#
Having someone to call at 3 a.m. is the priciest item, and it only shows up on the top tiers. Shield Advanced includes 24/7 access to the Shield Response Team, which also requires a paid AWS support plan (Business or Enterprise). On Azure, DDoS Rapid Response is part of Network Protection only. On Google Cloud, DDoS response support requires Cloud Armor Enterprise Annual and a Premium support account.
Cost protection and commitment#
Those same top tiers promise credits when an attack drives your bill up: Shield Advanced has DDoS cost protection, Azure credits scale-out costs during an attack on covered resources and Google offers DDoS bill protection on Enterprise Annual. In return, they usually require an annual commitment, and Shield Advanced benefits depend on fulfilling it.
What does going without protection cost?#
An attack charges you in three ways, and which one weighs most depends on how your infrastructure is billed.
Bandwidth billed during the attack. On most clouds, inbound traffic is free, but the response going out is data transfer out, billed per GB. In a layer 7 attack on a heavy page, your server generates every response. Hypothetical example: 10 million requests to a 500 KB page add up to 5,000 GB of egress. At $0.10 per GB (a hypothetical rate), that is $500 for a single day of attack. On a VPS with a transfer allowance, the same volume blows through the quota, and the excess becomes an overage charge or throttled bandwidth. The article on egress fees explains how that line works.
Automatic scaling. If your infrastructure adds instances or executions as load grows, the attack turns into paid capacity. On serverless, every attack request is a billed invocation. That is why advanced plans sell cost protection. The models are compared in serverless vs always-on: what each costs.
Downtime. When an attack threatens a provider's network, a common response is blackholing: the network drops all traffic destined to the attacked IP, as RFC 7999 describes. The junk stops arriving, and so do your real users. Here the cost is time offline. Hypothetical example: a store that sells $30,000 a month makes about $1,000 a day; 12 hours down cost around $500 in sales, plus customers who don't come back and support tickets. If your site is down and you don't know why yet, see why is my website down.
What are the price ranges by type of solution?#
The table shows hypothetical orders of magnitude, for comparing the models with each other. Check current prices on the official pages before deciding.
| Type of solution | How it bills | Order of magnitude (hypothetical) | What it usually includes |
|---|---|---|---|
| Included with hosting or a CDN | inside the plan | nothing beyond the plan | automatic mitigation; layer 7 varies by provider |
| CDN plan with a WAF | monthly fee per domain | tens of dollars a month | ready-made layer 7 rules and challenges for suspicious clients |
| Usage-based cloud | per policy, rule and request | a few to hundreds of dollars a month, depending on traffic | layer 7 you configure yourself, no response team |
| Advanced subscription | monthly fee with an annual commitment, plus usage | thousands of dollars a month | 24/7 response team, cost protection, reports |
| Emergency purchase | quoted during the attack | case by case | whatever can be switched on in time |
The bottom rows buy expert time and financial guarantees, which are only worth the price when downtime is expensive.
How do you choose the right level of protection?#
Do the math before the attack, not during it:
- List what is exposed. Websites, APIs and webhooks receive outside traffic. A bot that only opens an outbound connection to the Discord Gateway carries little risk.
- Work out what an hour of downtime costs. Revenue per hour, contract penalties, support hours. Compare that with the monthly fee of an advanced plan.
- Read what your hosting already includes. Which layers are filtered (3, 4 and 7), whether there is a WAF and whether bandwidth is metered. Metered bandwidth turns an attack into a bill.
- Close direct access to the origin. If the server answers on its IP, the attacker bypasses the CDN. Accept traffic only through the domain or only from the edge.
- Do your part in code. Rate limits, timeouts and caching cut the cost of each abusive request. The walkthrough is in how to protect your website or bot from DDoS, and setting up the limit is in what is API rate limiting.
How to do this on Square Cloud#
On Square Cloud, the included layer comes with every plan: DDoS mitigation at layers 3, 4 and 7 and a WAF, on a network with an Anycast CDN of 200+ points of presence (Cloudflare-backed) and HTTP/3. Protection is part of the plan from Hobby, at R$12.49 a month.
Bandwidth billed during an attack drops out of the math too: traffic is unlimited, with no bandwidth metering and no per-bandwidth or per-request charges (fair use policy). Each application gets dedicated bandwidth that grows with its RAM, 50 Mbps per 256 MB, never shared with others. Only port 80 receives traffic, published over HTTPS, and an application without a subdomain, such as a bot, receives no inbound traffic.
No mitigation makes a service immune, and the code side stays with you: rate limits, timeouts and caching. The cookieless web analytics included in every plan shows routes, countries, status codes and verified bots, which helps you spot a layer 7 attack. See what the network includes on the network page.
Infrastructure
L3/L4/L7 DDoS mitigation and a WAF on every plan
FAQs
Do I have to buy DDoS protection separately?
Not always. Many CDNs and clouds include automatic mitigation in the service; AWS, for example, applies Shield Standard to every customer at no additional cost. What is usually sold separately is advanced layer 7 protection, a response team and cost protection.
How much does a DDoS attack cost if you have no protection?
It depends on how you pay for infrastructure. Where outbound bandwidth and instances are billed by usage, the attack shows up on your bill. Where the provider drops all traffic to the attacked IP, the cost is downtime, measured in lost sales and users.
What is DDoS cost protection?
It is a credit some advanced plans give when an attack drives your bill up, for example through extra instances created by scaling. AWS Shield Advanced, Azure DDoS Network Protection and Cloud Armor Enterprise Annual offer this kind of credit, each with its own conditions.
Does a small website need paid DDoS protection?
Usually not. For most small projects, the mitigation included with the hosting or CDN, plus rate limiting, timeouts and caching in the application, covers the risk. An advanced subscription makes sense when an hour of downtime costs more than it does.
More in Security
See all 24 articles- Authentication vs authorization: the difference in practiceAuthentication confirms who you are; authorization decides what you can do. Learn 401 vs 403, roles, scopes and the bug of checking only the login, with code.
- JWT vs cookie sessions: which to use for loginWith sessions, state lives on the server and the cookie holds an ID; with JWT, the data travels in the token. Compare logout, CSRF, XSS and multiple instances.
- What is SQL injection and how to prevent itSQL injection happens when user input becomes part of a SQL query. See how the attack works and how to prevent it with parameterized queries in Node.js and Python.
- What is a brute force attack and how to defend against itA brute force attack tests passwords in bulk until one works. Learn the types (spraying, credential stuffing), how they work and the defenses, with code that runs.