Skip to main content

A distributed denial-of-service (DDoS) attack attempts to make a website or online service unavailable by overwhelming a network, server, or application with traffic or requests. Effective protection comes from layers that can detect and filter traffic before it consumes the resources you need. The right combination depends on the kind of service you run and where the traffic reaches your infrastructure.

This guide explains practical steps for reducing DDoS risk, what hosting providers and security services can do, and how to respond if your site becomes unreachable. No single setting can prevent every attack, so confirm what your host and security provider actually cover.

What is a DDoS attack?

A DDoS attack uses traffic or requests from multiple sources to disrupt a target. Those sources may include compromised devices controlled as a botnet, abused cloud infrastructure, or other distributed systems. The attack can target network capacity, connection handling, or expensive application endpoints.

Attack type What it targets Example impact
Volumetric Available network bandwidth Legitimate traffic cannot reach the site because the connection is saturated.
Protocol or state exhaustion Network devices or connection tables Firewalls, load balancers, or servers spend resources handling excessive connection traffic.
Application layer HTTP or application endpoints Repeated requests to costly pages or API routes consume application or database capacity.

A DDoS attack primarily targets availability. It does not, by itself, prove that information was accessed or changed. Attackers may combine availability attacks with other activity, so investigate separate security alerts on their own evidence.

Why DDoS risk matters to websites

An outage can interrupt sales, customer support, logins, or essential information. Smaller websites can also be affected, especially when they rely on a single server or have limited access to network-level controls. The effects depend on the attack traffic, the application, and the capacity and mitigation available upstream.

There is no single traffic threshold that identifies every attack. A promotion, a crawler, a software release, or a news event can also increase legitimate requests. Compare network and application signals before deciding that a spike is malicious.

How to protect your website from DDoS attacks

1. Ask your hosting provider what its mitigation covers

Protection can happen at different points, such as the network provider, hosting data centre, a managed edge service, or your own server. Ask where mitigation is applied and which traffic layers and protocols it covers. Also ask whether mitigation is always on or activated on request, how you contact the response team, and whether plan limits or extra charges apply.

Ask how you will be notified during an incident and what information support needs from you. A claim of “DDoS protection” is not enough to understand the coverage. Confirm how the service handles false positives, what logs or reports it provides, and whether it protects the public endpoint that your domain actually uses.

2. Route eligible web traffic through a CDN or edge protection service

A content delivery network (CDN) can serve cached content closer to visitors and may include DDoS mitigation for traffic that passes through its network. A reverse proxy or edge security service can also inspect supported HTTP and HTTPS requests before forwarding them to your origin. Capabilities vary by service, plan, and configuration. Cloudflare, for example, documents separate network-layer and HTTP-layer DDoS protections in its attack coverage guide.

For a CDN or proxy to help, configure the domain and traffic path so requests use the protected service. Review DNS records and make sure the origin server cannot be reached directly in a way that bypasses the edge. Keep administrative access and non-web services protected separately. A CDN does not automatically protect every protocol or exposed server address.

See our guide to using Cloudflare with web hosting for setup considerations.

3. Apply rate limits carefully

Rate limits can restrict repeated requests to sensitive or resource-intensive routes, such as login forms, search, or an API endpoint. They are most useful when placed at a layer that can absorb or filter traffic before it reaches the application. A server-side limit may not help if the network connection is already saturated.

A simple per-IP limit can affect legitimate visitors who share a network, such as customers behind a company or mobile-carrier gateway. Distributed attackers can also send requests from many IP addresses. Use application context, managed edge rules, and measured thresholds where possible. Monitor false positives and provide a safe way for legitimate users to continue.

4. Use a WAF as one layer, not the whole DDoS plan

A web application firewall (WAF) evaluates supported web requests against rules and can block suspicious patterns. It can help with some application-layer attacks, but a WAF alone does not necessarily stop bandwidth saturation or every network-level flood. WAF features, rule sets, and mitigation capacity differ between providers.

Test rule changes carefully. Overly broad blocking can prevent real customers from accessing the site, while a rule set that is not configured for your application may miss unwanted traffic. Learn more in our article about what a web application firewall does.

5. Monitor network and application signals

Use your hosting provider’s network or resource reports, CDN or WAF analytics, and server logs to spot unusual changes. Useful signals include bandwidth, request rates, connection counts, response times, error rates, and resource use. Compare them with normal patterns for the same time and check whether the affected pages or services share a common route.

Browser analytics can show changes in visits, but it may miss traffic that is blocked before a page loads. Do not rely on it as your only alert. Set notifications through the service that sees the relevant traffic, and check with your host about the fastest way to report an outage or suspected attack.

6. Keep applications and services maintained

Update your content management system, plugins, themes, web server, and other exposed software using a tested maintenance process. Updates reduce known vulnerabilities and help keep your systems supportable. They do not, on their own, absorb a volumetric attack, so combine maintenance with upstream traffic controls and an incident plan.

For broader account and application practices, see our web hosting security hardening guide.

7. Prepare an incident response plan

Write down who will contact your hosting provider or DDoS service, how you will communicate with customers, and who can approve configuration changes. Include support contacts, service dashboards, escalation steps, and a way to post an outage notice if your primary website is unavailable.

During a suspected attack:

  1. Record when the issue began, which pages or services are affected, and any alerts or error messages.
  2. Check the network, hosting, and edge-service dashboards to compare traffic and error patterns.
  3. Contact your hosting provider or mitigation service promptly. They may have network-level visibility and controls that are not available from your server.
  4. Follow the agreed mitigation process and avoid broad blocks that could lock out legitimate visitors.
  5. Keep relevant logs and note changes made, then monitor recovery and communicate clearly with affected users.

CISA’s response guidance also recommends activating an incident plan, notifying service providers, gathering evidence, and using available mitigation services. See its DDoS incident response guide.

The role of hosting in DDoS protection

Your hosting provider controls or works with parts of the network path that a website owner cannot manage from an application dashboard. A host may be able to filter or reroute traffic upstream, provide network reports, or coordinate with a protection service. The exact service and capacity depend on the provider and plan, so ask for details instead of assuming every hosting package includes the same mitigation.

When comparing plans, ask what protection is included, where it operates, whether it covers both network and web application traffic, what happens during an incident, and how to reach support. Also confirm whether you can restrict direct access to your origin if you use a CDN or reverse proxy.

Shared hosting plans with website security and DDoS protection features
Shared hosting with security features
Explore hosting plans and review the included protection and support details for your website.

Final thoughts

Protecting a website from DDoS attacks takes more than one plugin or setting. Start with mitigation from your hosting or network provider, route eligible traffic through a CDN or edge service when appropriate, and use rate limits and WAF rules carefully. Monitor the signals that see traffic before it reaches your application, and prepare a response plan before an outage occurs.

Every protection layer has limits. Confirm what your providers cover, protect the origin where possible, and keep a clear path to support. A measured, layered plan makes it easier to respond without blocking legitimate visitors or relying on assumptions about what a service can do.