What Is a Web Application Firewall (WAF)?
A web application firewall, or WAF, sits between visitors and your website. It inspects incoming web requests and blocks the ones that look malicious, such as attempts to exploit known weaknesses. It is one layer in a security setup, not a complete solution.
What a WAF does
- Blocks common attack patterns, such as attempts to inject malicious code into forms or URLs
- Filters known bad sources and suspicious automated traffic
- Limits request rates to slow brute-force login attempts and scraping
- May provide some protection against floods of traffic, depending on the service
- Can virtually patch some known problems while you wait to update
Different products use different rules and techniques, and capabilities vary widely.
Where a WAF runs
- At the network edge, often as part of a content delivery network or security service. Traffic goes through the provider before reaching your server. See what is a CDN and do you need one.
- On your host, as part of managed hosting.
- As a plugin or software on your site, which runs on your own server and uses its resources.
Edge services usually stop bad traffic before it reaches you. Plugin-based firewalls can see more about your application but still consume your server's capacity.
What a WAF cannot do
- It cannot fix outdated software. Keep everything updated. See WordPress updates and plugins: how to manage them
- It cannot protect against stolen passwords. Use strong passwords and two-factor authentication. See two-factor authentication for website accounts
- It cannot catch every attack, especially new or targeted ones
- It does not replace backups. See website backups: how and why
- It does not secure your other systems, such as email or devices
Common concerns
False positives
A WAF can block legitimate requests, such as a form submission that contains text it mistakes for an attack. Review logs after turning it on. Many services let you start in a monitoring mode before blocking, and create exceptions where necessary.
Performance
Edge firewalls can reduce load, while poorly configured ones can add delay. Test your speed. See how to test website speed.
Search engines and legitimate bots
Make sure rules do not accidentally block search engine crawlers or your monitoring tools. See how Google crawls and indexes your site and uptime monitoring for small sites.
Privacy
A WAF service processes your visitors' requests. Check its data handling terms and mention it in your privacy information if needed. See privacy policy and cookie banner basics.
Do you need one?
For a WordPress site, a store, or anything with logins and forms, a WAF is a sensible layer. For a static site with no forms processed on your own server, the attack surface is small, and a WAF is less critical. See how to keep your website secure.
Common mistakes
- Treating a WAF as a reason to skip updates
- Turning on strict rules without testing
- Blocking your own tools
Another layer works in the browser: security headers. Read website security headers explained.