On this page
In this guide we break down what DDoS attacks are and how they work, their types by network layer (3/4 vs. 7), early warning signs, the layers of defense from the edge to the origin, the role of a CDN and a WAF, setting up rate limiting, hardening server settings, a ready-made preparedness checklist, and a precise response plan during an attack, with reference tables, common mistakes and expert tips. This article is part of the website security series and complements the content delivery network (CDN) guide and the guide to installing SSL and enabling HTTPS.
What exactly are DDoS attacks?
DDoS stands for Distributed Denial of Service. The core idea is simple: every server has limited capacity, a maximum number of requests per second it can process, a maximum bandwidth it can pass through, and a limited number of simultaneous connections it can open. The attack deliberately consumes this capacity with massive fake traffic until none is left for legitimate visitors, so the site becomes very slow or stops entirely (503 errors or a complete outage).
The key word is distributed. In a simple denial-of-service (DoS) attack, the traffic comes from a single source, so it's easy to identify and block. In DDoS, the torrent comes from thousands or millions of compromised devices spread around the world, collectively called a botnet, and each one sends an amount that may look normal, but together they crush the server. This distribution is what makes it hard to distinguish malicious traffic from legitimate traffic, and what makes manual blocking by address useless.
It's important to distinguish a DDoS attack from a legitimate traffic spike: both can take down an unprepared site, but a legitimate spike is real traffic from interested people, while DDoS is artificial traffic whose only purpose is to exhaust resources. Good protection must tell them apart, absorbing the spike and repelling the attack at the same time.
Why are DDoS attacks launched?
The motives vary: financial extortion (demanding a ransom to stop the attack), unfair competition, revenge, or even a diversion that keeps the security team busy while a real intrusion happens elsewhere. From a defensive standpoint the motive doesn't matter much; what matters is being ready whatever the reason, because any site can be a target, small or large.
How do DDoS attacks work technically?
To understand the defense, you have to understand the mechanism. The attack exploits one of three weak points in the chain that serves a site: bandwidth capacity, server resources (CPU/RAM), or protocol limits and connection tables.
The process usually goes like this:
- Building a botnet: the attacker takes control of a network of compromised devices (computers, servers, cameras and poorly secured IoT devices).
- Aiming at the target: they order the network to send traffic to your site's or server's address at a set time.
- Simultaneous flooding: requests pour in from thousands of sources at once, so consumption of the targeted resource rises quickly.
- Collapse: once the available capacity is exceeded, legitimate requests start to fail and the site appears down to visitors.
Some attacks use amplification and reflection: the attacker sends small requests spoofing the victim's address to intermediate servers (such as DNS or NTP servers), and those servers reply with much larger responses directed at the victim, multiplying the attack's size without the attacker needing much bandwidth. These details matter to us only defensively, to understand why the front absorption layer must have huge capacity.
What are the types of DDoS attacks?
DDoS attacks are classified by the network layer they target in the OSI model. The most important practical classification distinguishes network and transport layer (3/4) attacks, which target infrastructure through volume, from application layer (7) attacks, which target your application's logic with requests that look legitimate.
| Category | Layer | Unit of measure | What it targets | Difficulty of detection |
|---|---|---|---|---|
| Volumetric attacks | 3/4 | Bits per second (bps) | Saturating bandwidth | Low (the volume is obvious) |
| Protocol attacks | 3/4 | Packets per second (pps) | Connection and state tables | Medium |
| Application layer attacks | 7 | Requests per second (rps) | Application and database resources | High (they resemble real traffic) |
Network and transport layer attacks (3/4)
These are volumetric and protocol attacks: their aim is to flood the pipe or exhaust connection state tables. Common examples include floods that exploit the UDP and ICMP protocols to saturate bandwidth, and attacks that exploit the TCP handshake to leave thousands of half-open connections draining the connection table. Their advantage for the defender is that they are huge and obvious: the volume itself is a giveaway, which is why large distributed networks (CDN/scrubbing) absorb them well before they reach the origin.
Application layer attacks (7)
These are more dangerous and harder to detect. Instead of flooding the pipe, they send HTTP/HTTPS requests that look completely legitimate but are aimed at your site's heaviest operations: a search page that runs a heavy query, a login endpoint, or a page that generates a report. The number of requests may be far lower than in volumetric attacks, but each request is costly, so a relatively small number is enough to bring the server down. The difficulty of detection here is that each individual request looks like a real visitor, so blocking by volume alone doesn't work; you need behavioral and fingerprint analysis (a WAF + smart rate limiting).
| Criterion | Layer 3/4 attacks | Layer 7 attacks |
|---|---|---|
| Target | Infrastructure and bandwidth | Application logic and the database |
| Typical volume | Very large (Gbps) | Relatively smaller but damaging |
| Resemblance to real traffic | Low | Very high |
| Best defensive tool | Network absorption / scrubbing / CDN | WAF + rate limiting + behavioral challenges |
| Ease of automated detection | High | Low |
What are the signs that your site is under a DDoS attack?
Early recognition shortens downtime. But be careful: some of these signs can result from a legitimate traffic peak or a server problem, so gather more than one signal before you decide.
| Sign | What you notice | Possible explanation |
|---|---|---|
| Sudden slowness or an outage | The site suddenly stops responding or becomes very slow | A resource is saturated |
| A sharp rise in requests | An unexplained jump in rps on the graph | A layer 7 flood |
| Strange geographic/source concentration | Heavy traffic from countries or networks where you have no audience | A botnet |
| A non-human traffic pattern | Identical requests, no cookies, a uniform User-Agent, a single path | Automated traffic |
| High CPU/bandwidth usage | Resources at 100% with no business reason | Deliberate exhaustion |
| Repeated 503 errors / connection timeouts | The server fails to serve requests | Capacity exceeded |
The practical difference between an attack and a legitimate peak: a legitimate peak is usually tied to a known cause (a campaign, a new article, a media mention), comes from varied, natural sources and devices, and browses multiple pages with human behavior. An attack usually comes with no business reason, in a repetitive pattern targeting a single path or the heaviest operations, and from sources that are abnormally concentrated.
How do you build a multi-layered defense against DDoS?
No single layer is enough. Effective protection is defense in depth: each layer handles a type of attack and leaves the rest to the next layer. The central idea: stop as much malicious traffic as possible as far as possible from your origin server, at the edge, before the origin.
| Layer | Where it sits | What it defends against | Example mechanism |
|---|---|---|---|
| Distributed network (CDN/Anycast) | The edge, farthest from the origin | Volumetric layer 3/4 attacks | Absorbing and dispersing traffic globally |
| Web application firewall (WAF) | The edge | Layer 7 attacks and malicious requests | Filtering with rules and signatures |
| Rate limiting | The edge and/or the origin | Excess from a single source | Curbing excess requests |
| Behavioral challenges | The edge | Automated bots | A lightweight test (JS/CAPTCHA when needed) |
| Server and firewall hardening | The origin | Whatever gets past the edge + direct access | Limiting connections and tuning the kernel |
| Monitoring and alerting | Cross-cutting, across all layers | Early detection | Alerts on traffic and resource thresholds |
The order of the layers matters: the distributed network up front absorbs the huge volume, then the WAF filters the remaining layer 7 requests, then rate limiting curbs excess, and finally a hardened server handles whatever gets through. The earlier you stop traffic, the lighter the load on everything after it.
A crucial point that ties all the layers together: hide the origin IP and block direct access to it. If your server keeps accepting connections from any address, an attacker can bypass every edge layer by going straight to the origin. That's why you must restrict the server firewall to accept connections only from the protection network's ranges, which we detail in the server hardening section.
How does a distributed CDN absorb DDoS attacks?
This is the first and most important layer against volumetric attacks. The idea is simple at its core: to take down a single server, the attacker only needs to exceed that server's capacity; but to take down a distributed network of hundreds of points of presence (PoPs), they need to exceed the total capacity of the whole network, which is usually vastly larger than any single attack. The distributed network turns a weak point (a single server) into a huge surface that absorbs and disperses.
The mechanism relies on Anycast: the site's same address is announced from every point of presence around the world at once. So when an attack is launched from a geographically distributed botnet, the traffic from each region reaches the point of presence closest to it instead of all concentrating on a single server. The result is that the attack itself is automatically dispersed across dozens of locations, each point absorbs a small share it can handle, and nothing significant reaches the origin.
Specialized networks add scrubbing centers on top of that: when an attack is detected, traffic is routed through centers that inspect it, drop the malicious packets and pass only the clean ones on to the origin. That way the service stays available to real visitors while the malicious torrent is filtered at the edge. To dig deeper into how distributed networks work in general, see the content delivery network (CDN) guide.
A crucial additional advantage: when all your traffic passes through the network as a reverse proxy, the origin IP is hidden, so the world sees only the network's addresses and it's harder for an attacker to target your real server directly, provided your address doesn't leak from somewhere else (we'll deal with that in the common mistakes).
What is the role of a web application firewall (WAF)?
While the distributed network absorbs volume, the web application firewall (WAF) handles what volume alone can't reveal: malicious layer 7 requests that look legitimate. The WAF sits at the edge between the visitor and your application and checks every HTTP/HTTPS request against rules, allowing clean requests and blocking or challenging suspicious ones.
The WAF's defensive capabilities against DDoS and other threats:
- Managed rulesets: up-to-date rule sets that recognize known harmful request patterns (including SQL injection and XSS) and block them before they reach the origin.
- Signatures and source reputation: blocking networks and sources with a bad reputation, and bad bots, based on up-to-date reputation lists.
- Custom rules: you can write a rule that blocks or challenges any traffic to a sensitive path (such as
/wp-login.phpor/xmlrpc.php) from outside your country or above a certain rate. - Escalating behavioral challenges: instead of blocking outright, the WAF presents a light challenge (a JavaScript check, then a CAPTCHA when suspicion is higher) that a real browser passes easily and an automated bot fails.
Expert tip: enable the "Under Attack" mode that many services offer when you suspect an attack. It imposes a verification challenge on every visitor for a few moments before letting them through, filtering out automated bots very efficiently without blocking humans, at the cost of a little temporary friction that's acceptable only during a crisis.
How do you set up rate limiting?
Rate limiting sets a cap on the number of requests allowed from a single source within a time window. If a source exceeds the cap, its requests are delayed, rejected or challenged. It's an effective weapon against layer 7 attacks and guessing and exhaustion attempts, because it limits any single source's ability to overdo it.
The key is setting values that curb excess without bothering real users. The right values differ depending on the nature of the path:
| Path type | Sensitivity | Suggested rate policy (initial) | Reason |
|---|---|---|---|
| Login / password recovery | Very high | A few attempts per IP per minute, then a temporary block | Resisting credential guessing |
| API endpoints | High | A clear cap per key/IP, with headers showing the remaining limit | Preventing exhaustion and abuse |
| Search and heavy pages | Medium-high | A moderate cap per IP | Every request is costly for the origin |
| Normal page browsing | Low | A high, lenient cap | Avoid disrupting normal browsing |
| Static assets (images/CSS/JS) | Low | Usually served from the cache without tight limits | They don't load the origin at all |
Practical principles for setting up rate limiting:
- Start lenient, then tighten: observe your site's normal traffic rates first, and set the caps above your legitimate peak with a margin, so you don't block real users.
- Differentiate by path: a strict cap on
/loginand a lenient one for browsing articles. A single cap for the whole site is either too loose to protect or too tight and annoying. - Use the real IP behind the proxy: behind a CDN, rate limiting must read the visitor's real address from the appropriate header; otherwise it counts all visitors as if they came from one address and disables itself.
- A gentle response: return a
429 Too Many Requestscode with aRetry-Afterheader, and consider a challenge before an outright block to avoid harming a user behind a shared address (NAT).
Rate limiting alone isn't enough against a truly distributed attack (because each of thousands of addresses may stay under the cap), but it's an indispensable layer that works together with the distributed network and the WAF: the network absorbs the volume, the WAF filters the patterns, and rate limiting curbs individual excess.
How do you harden your server and origin settings?
Edge layers are essential, but your origin server must also be hardened, for two reasons: to withstand whatever gets past the edge, and to repel direct access attempts that bypass the protection.
The golden rule: block direct access to the origin
Hiding the origin IP without restricting its firewall is useless. If your address leaks (through an old DNS record, an email header or an application error), the attacker can bypass everything. The solution: configure the server firewall to accept HTTP/HTTPS connections only from the protection network's IP ranges, and reject any other direct connection.
Hardening at the server and application level
| Action | Purpose | Note |
|---|---|---|
| Accept 80/443 only from the protection ranges | Prevent bypassing the edge through direct access | Update the list periodically |
| Tune connection timeouts | Close deliberately slow connections quickly | Resists connection exhaustion |
| A cap on concurrent connections per IP | Prevent monopolizing the connection table | At the server/proxy level |
| Tune kernel network parameters | Improve resilience under packet pressure | Carefully, with understanding |
| Disable what you don't use (such as xmlrpc) | Shrink the layer 7 attack surface | Especially in WordPress |
| Strong caching at the edge and the origin | Reduce what reaches costly dynamic generation | Cache = a shock absorber |
| Sufficient, scalable resources | Headroom that withstands peaks | Choose a suitable plan |
A crucial point: caching is a layer of defense, not just a speed tool. The more pages are served from the cache at the edge, the less reaches your costly dynamic generation, making the server harder to take down with a layer 7 attack. That's why speed and resilience overlap: a well-cached site is harder to flood.
Choosing your hosting is itself part of the defense. Shared hosting shares resources, so an attack may affect a neighbor or your provider may restrict you with strict rules, while plans with isolated, scalable resources give you more headroom to hold out. Weigh your options in the shared vs. VPS vs. managed hosting guide. And to harden your control panel and server accounts, see the cPanel security guide.
Preparedness checklist before an attack
Advance preparation matters more than reaction. Review this list before you need it; the middle of an attack is no time for setup.
| Item | Ready? | Why it matters |
|---|---|---|
| The site sits behind a distributed network (CDN) as a proxy | ☐ | The first layer for absorbing volume |
| WAF enabled with managed rules | ☐ | Filtering layer 7 requests |
| Rate-limiting rules on sensitive paths | ☐ | Curbing individual excess |
| Origin IP hidden and not leaking | ☐ | Prevents targeting the server directly |
| Server firewall accepts only the protection ranges | ☐ | Prevents bypassing the edge |
| Monitoring and alerts on traffic and resources | ☐ | Early detection |
| A written response plan and named contacts | ☐ | Fast, organized action |
| Recent backups with tested restores | ☐ | Guaranteed recovery in the worst case |
| Logs enabled with enough detail | ☐ | Analyzing the attack afterward |
| You know how to enable "Under Attack" mode | ☐ | Rapid escalation in a crisis |
Expert tip: document contacts and permissions in advance. Who logs into the CDN dashboard? Who contacts hosting support? Who decides to enable "Under Attack" mode? In the middle of a crisis there's no time to hunt for passwords or permissions.
The response plan during an attack
If an attack happens despite your preparation, follow organized steps instead of flailing. The goal: confirm, contain, mitigate, then recover, documenting throughout.
| Step | Action | Target |
|---|---|---|
| 1. Confirm | Compare the symptoms with the signs of an attack; separate an attack from a legitimate peak or a fault | Avoid the wrong reaction |
| 2. Escalate | Enable "Under Attack" mode and tighten WAF and rate-limiting rules | Stronger filtering immediately |
| 3. Scope | Identify the attack type (layer 3/4 or 7) and the targeted path/source | Aim the defense precisely |
| 4. Mitigate | Write specific rules (block/challenge the source or path), enable scrubbing if available | Reduce the impact |
| 5. Protect the origin | Make sure the firewall accepts only the edge and the cache absorbs as much as possible | Prevent direct bypass |
| 6. Communicate | Notify your hosting/CDN support, and inform your team and stakeholders | External support and help |
| 7. Monitor | Follow the graphs and resources until things stabilize | Measure how effective your actions are |
| 8. Recover | Restore settings gradually, document the incident, and strengthen your defenses for next time | Prevent a repeat |
While carrying out the plan, stick to these rules:
- Don't turn off monitoring: you need the graphs to know whether your actions are working.
- Tighten gradually: start with the lowest-friction option (a challenge) before outright blocking, to minimize harm to real users.
- Document every step with its time: documentation made on the spot can't be recreated later, and it helps with analysis and prevention.
- Don't expose the origin in a panic: avoid any change that drops the proxy and exposes the origin address.
Expert tip: don't rely on "blocking addresses manually" as your main strategy against DDoS. A distributed attack comes from thousands of changing addresses, so manual blocking is a losing race. Rely on behavioral rules, challenges and automated filtering at the edge.
Common mistakes in DDoS protection
- Hiding the origin IP without restricting its firewall: the most common mistake. If the server accepts connections from any address, a single leaked IP is enough for the attacker to bypass all protection through direct access. Restrict access to the protection ranges only.
- Leaking the origin IP without realizing it: old subdomain DNS records (such as
mailorftp) pointing to the origin, outgoing email headers or error messages can reveal your address despite the proxy. Review and clean them up. - Relying on a single layer: assuming that enabling a CDN alone is enough. The network absorbs volumetric attacks, but layer 7 needs a WAF and rate limiting. Defense comes in layers.
- Rate limiting that's stricter than necessary: a cap that's too low blocks real users, especially behind shared addresses (NAT) or corporate networks. Calibrate the values above your legitimate peak.
- Not reading the real IP behind the proxy: if rate limiting and blocking measure the CDN's address instead of the real visitor's, they'll either block everyone or no one. Extract the address from the correct header.
- Confusing an attack with a legitimate peak: blocking real traffic in the belief that it's an attack costs you visitors and revenue. Gather several signals (cause, pattern, source) before you decide.
- No plan and no alerts: discovering an attack late through visitor complaints instead of automated alerts prolongs downtime. Set up monitoring in advance.
- Neglecting backups: an attack may be accompanied by an intrusion attempt. A recent backup with a tested restore is the last safety net.
Common problems and their solutions
The site is still slow despite enabling protection
Usually because the attack is at layer 7, and the network absorbs only volumetric traffic without filtering requests that look legitimate. The solution: enable "Under Attack" mode, tighten your WAF rules, add rate limiting on the targeted path, and raise your cache ratio to reduce what reaches the origin.
The attacker bypasses the protection and reaches the server directly
The origin address has leaked or the firewall isn't restricting access. The solution: change the origin IP if possible, clean up the DNS records that expose it, and configure the server firewall to accept 80/443 only from the protection ranges. Check email headers and error messages that may give the address away.
Rate limiting blocks real users
The cap is too low, or it measures the CDN's address instead of the visitor's. The solution: raise the cap above the observed legitimate peak, use a challenge instead of an outright block, and make sure the limit reads the visitor's real IP from the appropriate header, not the proxy's address.
False alerts that confuse a legitimate peak with an attack
The monitoring thresholds are too tight or don't distinguish behavior. The solution: set the thresholds above your normal traffic patterns, and gather multiple signals (source, pattern, path, whether there's a business reason) before escalating, so you don't block a sudden legitimate visit.
The SSL certificate or HTTPS breaks after tightening settings
Tightening the firewall or the SSL mode can cut the encrypted path between the edge and the origin. Make sure the SSL mode is set to Full (Strict), that the origin certificate is valid, and that the firewall doesn't stop the edge from reaching the origin over 443. For details: installing SSL and enabling HTTPS.
The attack returns after stopping
It's common for an attacker to come back with a different pattern to test your defenses. The solution: don't relax your settings immediately after things calm down, keep monitoring tight for a while, document the pattern of the first attack to speed up your response to the next wave, and review the preparedness checklist to close any gap that was exploited.
Conclusion
DDoS attacks exhaust your server's resources with fake, distributed traffic from thousands of devices until it stops serving real visitors. By layer, they divide into volumetric and protocol attacks (3/4), which target infrastructure with huge volume and are easy to detect, and application layer attacks (7), which send legitimate-looking requests that drain your application's logic and are hard to detect. A single layer isn't enough for protection; effective defense is multi-layered: a distributed network (CDN) that absorbs volume at the edge, a WAF that filters layer 7 requests, rate limiting that curbs excess, and a hardened server that accepts only the edge, with a hidden origin IP.
The key is preparedness before an attack: connect your site to protection, harden the origin, hide its address and restrict its firewall, enable monitoring and alerts, and write a response plan with named contacts. In a crisis, confirm, escalate, scope, mitigate, then protect the origin and follow through until things stabilize, documenting every step. Always remember that a strong cache is a shock absorber, and that manually blocking addresses is a losing race against a distributed attack. Start from sound hosting with sufficient resources, build edge layers on top of it, and test your plan before you need it, because the difference between minutes of downtime and days is preparation.
Frequently asked questions
What's the difference between DoS and DDoS? DoS is a denial-of-service attack from a single source, so it's easy to identify and block. DDoS is a distributed attack from thousands of compromised devices (a botnet) at the same time, so it's hard to tell apart from legitimate traffic and impossible to block manually by address. The distribution is what makes DDoS far more dangerous and harder to repel.
Is my small site at risk of DDoS attacks? Yes. Any site can be a target regardless of its size, for reasons ranging from extortion and competition to random experimentation. And small sites are often less protected, so a small attack may be enough to take them down. Preparedness helps everyone, not just large sites.
Is a CDN alone enough to protect against DDoS? A distributed network is excellent at absorbing volumetric attacks (layers 3/4), but on its own it isn't enough against layer 7 attacks that look legitimate. Alongside it you need a WAF, rate limiting, server hardening and a hidden origin IP. Protection is a set of integrated layers, not a single tool. See the CDN guide for details.
How do I know my site is under attack and not just seeing a normal traffic peak? An attack usually has no known business reason, follows a repetitive pattern targeting a single path or the heaviest operations, and comes from sources that are abnormally concentrated and show no human behavior. A legitimate peak has a cause (a campaign or a publication) and comes from varied devices behaving naturally and browsing multiple pages. Gather several signals before you decide.
What's the difference between layer 3/4 and layer 7 attacks? Layer 3/4 attacks are volumetric: they target infrastructure and bandwidth with huge volume, are easy to detect and are absorbed by distributed networks. Layer 7 attacks target application logic with fewer but costly requests that resemble real traffic, so detecting them requires a WAF and behavioral analysis. Each needs a different defense.
Why should I hide my origin IP address? Because exposing it lets an attacker bypass every layer of protection at the edge and reach your server directly. But hiding it isn't enough on its own: you must restrict the server firewall to accept traffic only from the protection network's ranges, and stop the address from leaking through subdomain DNS records, email headers or error messages.
Does rate limiting help against DDoS? Yes, as a complementary layer: it curbs excess from a single source and resists guessing and exhaustion attempts on sensitive paths. But on its own it can't stop a truly distributed attack, because each of thousands of addresses may stay under the limit. Set the values above your legitimate peak to avoid blocking real users.
Does my hosting protect me from DDoS attacks automatically? Many providers offer basic protection, but its level varies widely. Shared hosting may throttle or suspend you under heavy pressure, while isolated plans offer more headroom. Check exactly what your plan includes and add edge layers on top of it. Weigh your options in the shared vs. VPS vs. managed hosting guide.
What should I do in the first moments of an attack? First, confirm that it's an attack and not a peak or a fault. Then enable "Under Attack" mode and tighten your WAF and rate-limiting rules, identify the attack type and the targeted path and write specific rules, make sure the origin is protected and the cache absorbs as much as possible, notify your hosting/CDN support, and monitor until things stabilize, documenting every step.
Is blocking addresses manually enough to stop an attack? No. A distributed attack comes from thousands of changing addresses, so manual blocking is a losing race and a waste of time in a crisis. Rely on behavioral rules, challenges and automated filtering at the edge, and save manual blocking for very rare cases with a specific source.
Does caching have anything to do with DDoS protection? Yes. The more pages are served from the cache at the edge, the less reaches your costly dynamic page generation, making the server harder to take down with a layer 7 attack. A strong cache is a shock absorber, not just a speed tool, so make it part of your resilience strategy, not just your performance strategy.
Frequently asked questions
What's the difference between DoS and DDoS?
DoS is a denial-of-service attack from a single source, so it's easy to identify and block. DDoS is a distributed attack from thousands of compromised devices (a botnet) at the same time, so it's hard to tell apart from legitimate traffic and impossible to block manually by address. The distribution is what makes DDoS far more dangerous and harder to repel.
Is my small site at risk of DDoS attacks?
Yes. Any site can be a target regardless of its size, for reasons ranging from extortion and competition to random experimentation. And small sites are often less protected, so a small attack may be enough to take them down. Preparedness helps everyone, not just large sites.
Is a CDN alone enough to protect against DDoS?
A distributed network is excellent at absorbing volumetric attacks (layers 3/4), but on its own it isn't enough against layer 7 attacks that look legitimate. Alongside it you need a WAF, rate limiting, server hardening and a hidden origin IP. Protection is a set of integrated layers, not a single tool. See the CDN guide for details.
How do I know my site is under attack and not just seeing a normal traffic peak?
An attack usually has no known business reason, follows a repetitive pattern targeting a single path or the heaviest operations, and comes from sources that are abnormally concentrated and show no human behavior. A legitimate peak has a cause (a campaign or a publication) and comes from varied devices behaving naturally and browsing multiple pages. Gather several signals before you decide.
What's the difference between layer 3/4 and layer 7 attacks?
Layer 3/4 attacks are volumetric: they target infrastructure and bandwidth with huge volume, are easy to detect and are absorbed by distributed networks. Layer 7 attacks target application logic with fewer but costly requests that resemble real traffic, so detecting them requires a WAF and behavioral analysis. Each needs a different defense.
Why should I hide my origin IP address?
Because exposing it lets an attacker bypass every layer of protection at the edge and reach your server directly. But hiding it isn't enough on its own: you must restrict the server firewall to accept traffic only from the protection network's ranges, and stop the address from leaking through subdomain DNS records, email headers or error messages.
Does rate limiting help against DDoS?
Yes, as a complementary layer: it curbs excess from a single source and resists guessing and exhaustion attempts on sensitive paths. But on its own it can't stop a truly distributed attack, because each of thousands of addresses may stay under the limit. Set the values above your legitimate peak to avoid blocking real users.
Does my hosting protect me from DDoS attacks automatically?
Many providers offer basic protection, but its level varies widely. Shared hosting may throttle or suspend you under heavy pressure, while isolated plans offer more headroom. Check exactly what your plan includes and add edge layers on top of it. Weigh your options in the shared vs. VPS vs. managed hosting guide.
What should I do in the first moments of an attack?
First, confirm that it's an attack and not a peak or a fault. Then enable "Under Attack" mode and tighten your WAF and rate-limiting rules, identify the attack type and the targeted path and write specific rules, make sure the origin is protected and the cache absorbs as much as possible, notify your hosting/CDN support, and monitor until things stabilize, documenting every step.
Is blocking addresses manually enough to stop an attack?
No. A distributed attack comes from thousands of changing addresses, so manual blocking is a losing race and a waste of time in a crisis. Rely on behavioral rules, challenges and automated filtering at the edge, and save manual blocking for very rare cases with a specific source.
Does caching have anything to do with DDoS protection?
Yes. The more pages are served from the cache at the edge, the less reaches your costly dynamic page generation, making the server harder to take down with a layer 7 attack. A strong cache is a shock absorber, not just a speed tool, so make it part of your resilience strategy, not just your performance strategy.