Skip to content
Security2 min read

What is a WAF (web application firewall)?

Short answer

A web application firewall (WAF) is a security layer that inspects the content of every HTTP request to your site, compares it with rules describing known attacks such as SQL injection and XSS, and allows or blocks it before it reaches your code.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. How a WAF works
  2. Where a WAF runs
  3. Examples of what it blocks
  4. Problems and common confusions
  5. On ArabyHost

A traditional firewall looks only at IP addresses and ports: it sees an ordinary request to port 443 and lets it through. A WAF reads the request itself (the URL, parameters, form fields and headers) and looks for attack patterns inside.

How a WAF works

  1. An HTTP request arrives at the server.
  2. The WAF checks it against a rule set, such as the OWASP Core Rule Set or the security vendor’s own rules.
  3. If the request matches a dangerous rule, it’s blocked, usually with a 403 Forbidden, and logged.
  4. If nothing matches, it passes through to the site as normal.

A WAF usually runs in one of two modes: detection only (log without blocking, handy for testing) or blocking.

Where a WAF runs

  • On the hosting server: such as ModSecurity, seeing each request as soon as it reaches the server.
  • On a cloud proxy: such as Cloudflare, checking requests before they reach the server at all.
  • Inside the application: such as WordPress security plugins, which run after PHP starts and so use more resources.

Examples of what it blocks

Request Attack type
/product.php?id=1' OR '1'='1 SQL injection
/search?q=<script>alert(1)</script> XSS
/download.php?file=../../etc/passwd Path traversal
Thousands of POST /wp-login.php requests Password guessing

Problems and common confusions

  • False positives: an editor saving code inside a post may be blocked. The fix is to exclude that rule ID for that URL only, as explained on the ModSecurity 403 error page.
  • A WAF isn’t antivirus: it doesn’t clean files that are already infected; that’s the malware scanner’s job.
  • A WAF doesn’t fix code: if the site has an injection flaw, the real fix is in the code.

On ArabyHost

ArabyHost servers are protected by Imunify360, which includes web application firewall rules that work with the LiteSpeed web server and block known patterns before they reach your site. If a legitimate request is blocked, send our Arabic support team the URL and the time of the error so we can review the rule involved. For complete protection, follow the protect your site from hacking guide.

FAQ

Does a WAF replace updating WordPress and plugins?

No. A WAF blocks known patterns, and new or modified attacks can slip through. Updates close the hole itself; a WAF is an extra layer on top.

Why do I get a 403 error after a WAF is enabled?

A rule probably flagged your request as an attack, for example saving a post that contains JavaScript or SQL. That's a false positive, fixed by excluding that specific rule rather than switching protection off.

What's the difference between a server WAF and a cloud WAF?

A server WAF such as ModSecurity runs on the hosting server itself; a cloud WAF such as Cloudflare's runs on a proxy network before traffic reaches the server. You can use both.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.