What is a DDoS attack and how to protect your website
A DDoS (Distributed Denial of Service) attack floods your website or server with so much traffic from many devices that real visitors cannot reach it. This guide explains what a DDoS attack is in simple terms, how to tell it apart from normal problems, and the practical steps to protect your site.
Types of DDoS attacks
- Volumetric attacks: huge amounts of traffic that fill the network connection.
- Protocol attacks: abuse of network protocols to exhaust firewalls or server connections.
- Application-layer (Layer 7) attacks: thousands of requests that look like normal visits, often to heavy pages such as search, login or add-to-cart. These are the most common against small business sites.
Is it really a DDoS?
Many "attacks" are actually something else. Before you react, check:
- Is it only your site? If other sites on the same hosting work, the problem may be your site's code, a plugin or resource limits.
- Look at the traffic: in cPanel, check Metrics (such as Visitors, Raw Access or Resource Usage) for a sudden flood of requests from many IPs to the same URL.
- Consider legitimate spikes: a sale, a TV mention or a viral post can also bring sudden traffic.
- Check bad bots: aggressive crawlers can overload a site without being a real DDoS.
How to protect your website
- Put the site behind a CDN with DDoS protection. Cloudflare's free plan includes DDoS mitigation and hides your server's real IP. Pointing your nameservers to Cloudflare is usually all it takes; keep your mail records correct while you do it (see DNS records explained).
- Use caching. A cached page costs the server almost nothing, so the site survives far more requests. On EgWeb, LiteSpeed Cache for WordPress helps a lot (see how to speed up your WordPress website).
- Add rate limiting on sensitive URLs such as login, search and checkout, through Cloudflare rules or your security plugin.
- Block unwanted countries or bots if your customers are only in Egypt or the region, using Cloudflare WAF custom rules.
- Do not leak your server IP. If you use Cloudflare, avoid DNS records that point directly to the server (except mail records that must).
During an attack
- If you use Cloudflare, turn on Under Attack Mode from the dashboard. Visitors see a short check before the site loads.
- Open a ticket with EgWeb support with the time the problem started and any URLs you noticed. Our team can check server logs and the firewall.
- Turn Under Attack Mode off again once traffic returns to normal, because it adds a delay for real visitors.
Frequently asked questions
Why would anyone attack my small website?
Many attacks are automated and not personal: botnets scan the internet for weak targets. Competitors, extortion or a dispute with someone can also be reasons.
Do I need a VPS or dedicated server to stop DDoS?
Not necessarily. A bigger server handles more load but does not stop a large flood by itself. A CDN such as Cloudflare in front of the site does more. For very busy sites, see our VPS plans.
Will a DDoS attack steal my data?
A DDoS attack aims to make the site unavailable, not to steal data. But it is sometimes used as a distraction, so keep your site updated and monitored.