Skip to content

What is a web application firewall (WAF)?

By Ash, Founder, HosteazePublished 2 min read

A web application firewall (WAF) sits between your website and its visitors, inspecting every web request and blocking the ones that look like attacks, such as SQL injection, cross-site scripting or login floods. It protects the application itself, like WordPress or a shop, which an ordinary network firewall doesn't look at closely.

A stainless steel mesh sieve on a white cloth, which lets the fine stuff through and catches the lumps, much as a WAF filters web traffic.
Credit: webandi via Pixabay

A normal firewall is like a bouncer checking which door you're using. A web application firewall reads what you're carrying. It inspects the contents of each request to your website, the form fields, the address and the headers, and turns away anything that looks like an attack before your site has to deal with it.

What does a WAF actually block?

OWASP, the non-profit that tracks web security risks, describes a WAF as a set of rules applied to each HTTP conversation, usually aimed at common attacks. In practice, that means things like:

Injection is still on the OWASP Top 10:2025 list of the most serious web application risks, which tells you how often sites get this wrong.

What types of WAF are there?

TypeWhere it runsProsCons
Cloud or DNS-basedA service in front of your site, via a DNS changeBlocks attacks before they reach your server; often adds a CDNAnother service to manage and pay for
Server-levelOn the web server, such as ModSecurityCovers every site on the server; the host maintains itYou usually can't fine-tune the rules yourself
Plugin-levelInside WordPress as a security pluginEasy to install; understands WordPressRuns after the request reaches your site, using its resources

Many hosts run a server-level WAF using ModSecurity with the OWASP Core Rule Set (CRS), a free set of attack detection rules. It's worth asking your host whether they do.

Does a WAF make my site secure?

It makes it harder to break, which isn't the same thing. A WAF can't fix a weak admin password, an abandoned plugin or a missing backup. Think of it as a seatbelt, not a reason to drive badly. Pair it with DDoS protection for traffic floods, and work through our guide on how to protect a website from hackers for the rest.

More plain-English guides are in Email and domains.

Frequently asked questions

Do I need a WAF for a small WordPress site?

It's a useful extra layer, not a replacement for the basics. Keeping WordPress, themes and plugins updated and using strong, unique passwords with two-factor login does more. A WAF earns its place by blocking attacks on flaws you haven't patched yet.

Can a WAF block real visitors by mistake?

Yes. These are called false positives, for example a contact form message that happens to contain code-like text. Good WAFs let you or your host switch off a single rule for a specific page, and the OWASP Core Rule Set is designed to keep false alerts to a minimum.

Is a WAF the same as DDoS protection?

No, though some services offer both. A WAF looks at what each request contains. DDoS protection deals with the sheer volume of traffic, which can knock a site offline even if every request looks harmless.

Sources

  1. OWASP, Web Application Firewall
  2. OWASP CRS Project
  3. OWASP Top 10:2025

Hosting with security built in

See what comes with every Hosteaze hosting plan.

See hosting plans