A web application firewall (WAF) is a filter in front of a website that checks each incoming request against sets of rules and stops the ones that look like attacks before they reach the site. Rules can look at the IP address, the address path, headers and the request body. A WAF is useful for almost any site. Its risk is the reverse: a rule set too tight can block customers, payment callbacks, Googlebot or the AI crawlers you want.
What is a WAF? #
OWASP, the open web security project, calls it an application firewall for HTTP applications. It applies rule sets to HTTP traffic and sits in front of the site like a reverse proxy. OWASP says these rules generally cover common attacks such as cross-site scripting (XSS) and SQL injection. A WAF often comes as part of a CDN, so it filters requests before they reach your origin server.
How does it work? #
Every request is compared with the rules. Cloudflare’s WAF docs, as one example, say rules can filter by IP address, URL path, headers and body content. A request that matches can be blocked, slowed, or sent a check such as a managed challenge or CAPTCHA. A blocked visitor usually gets a status code such as 403 Forbidden: MDN says it means the server understood the request but refused to process it.
The main kinds of rule #
Cloudflare’s WAF, as one example, splits the work like this:
| Part | What it does |
|---|---|
| Managed rules | Pre-configured rule sets you switch on for immediate protection, kept up to date by the provider |
| Custom rules | Your own rules to protect the site and its APIs from malicious traffic |
| Rate limiting rules | Limits on how many matching requests are allowed in a set time |
| Security Events | A log of the requests the rules stopped or challenged, based on sampled logs |
| Security Analytics | Information about all incoming HTTP requests, including those no rule touched |
Its managed rules page lists a Free Managed Ruleset on all plans, covering high-impact, widely exploited weaknesses. You can add exceptions that skip rules under set conditions, or overrides that change a rule’s action.
Why does it matter for security? #
Most small sites run on common software, and automated attacks probe it for known weak spots. A WAF can block many of these before they reach your server, often with managed rule sets the provider keeps up to date. It can also slow a flood: see rate limiting and DDoS attack. Some services add an emergency mode for heavy attacks, such as Under Attack Mode.
Why does it matter for search? #
Google warns about the flip side. In its post of 24 December 2024, it says the bots you want on your site may end up in your CDN’s blocklist, typically in a WAF. That stops crawlers reaching your site and can keep pages out of search. Google calls 429 or 503 the preferred way to signal a temporary block, and strongly recommends a 503 for bot-challenge pages, so content is not dropped from its index. See Cloudflare blocking Googlebot and crawl budget.
Why does it matter for AI answers? #
An AI crawler such as GPTBot or ClaudeBot meets the same firewall as Googlebot. If a bot rule blocks it, your pages cannot be read for AI answers, whatever robots.txt says. Bot settings such as Bot Fight Mode and Super Bot Fight Mode can catch them. If you do want them out, decide on purpose: see block AI crawlers, blocking AI crawlers on Cloudflare and pay per crawl.
How do I let good bots through safely? #
Do not trust the name alone. Anyone can send a user agent that says Googlebot. Google offers two checks: a reverse DNS lookup then a forward lookup for one-off cases, or matching the address against its published IP range files, such as common-crawlers.json, for large scale. OpenAI and Perplexity publish lists for their bots too. Allow verified bots by address, not by name. See reverse DNS bot check and bot score.
Worked example: a law firm’s login page #
A law firm’s site has a login page for staff at /login. Its Security Events show hundreds of attempts a night from addresses abroad. A custom rule that challenges visitors to /login only, plus a rate limit on the same path, stops the flood without touching the rest of the site. Clients reading the firm’s guides, and Googlebot crawling them, never see a check.
| Rule | Applies to | Action |
|---|---|---|
| Challenge | Path starts with /login |
Managed challenge |
| Rate limit | /login, more than a set number of tries per minute from one address |
Block for a while, ideally with 429 |
| Everything else | Guides, contact page, sitemap, robots.txt | No check |
MDN says 429 Too Many Requests means the client sent too many requests in a given time, and a Retry-After header can say how long to wait.
Common mistakes #
- Blocking a whole country when only one path is being attacked, which can also block a payment provider’s callbacks.
- Switching on a strict rule set without reading Security Events for the next few days to see who it caught.
- Challenging
robots.txt, sitemaps or feeds, which are meant for machines. - Sending a challenge page with a 200 status. Google asks for a 503.
- Allowing bots by name only, so fakes get through.
- Treating the WAF as the fix and leaving the site’s software out of date. OWASP notes that tuning a WAF can take real effort, and must be kept up as the application changes.
How to check it #
- In your WAF’s dashboard (for Cloudflare: Security, then Events), look at what was blocked, from where and by which rule.
- Look for blocks on Googlebot, Bingbot or AI crawlers you want. Our Verify an AI Bot tool checks whether a visitor really is the bot it claims to be, using its address and the published lists.
- Fetch your own pages from outside. Our HTTP Header Checker shows if you get a 403 or a challenge instead of the page.
- Check that robots.txt answers 200 through the firewall with the Robots.txt Checker, and that your sitemap loads with the XML Sitemap Checker.
- Run the AI Bot Checker to see which AI bots your rules let in, then compare with your firewall’s bot settings.
- Check redirects added by the firewall or CDN with the Redirect Checker, and what AI can read with the AI Readiness Checker.
- In Google Search Console, use URL Inspection. Google says that if the rendered page shows an empty page, an error or a bot challenge, talk to your CDN.
- Read your server logs for blocked bots. The in-browser AI Crawler Log Analyser is live.
- Check the rest of your defences. The Security Headers Checker, WordPress Security Checker and SSL Certificate Checker are live. See SSL certificate and prompt injection.
- Set your headers and bot rules beside a rival’s with Compare Two Websites.
- Over time, the bot rules manager (robots.txt and firewall rules written for you), the fake bot detector, the bot verification log, the scraper and flood detector and bot cost are in URSY Pro, opening in stages.
What URSY.com counts #
We read the CDN’s own edge log, which lists every request with its user agent, path, status, country and cache status. So a bot that your firewall answers with a 403 still shows up, with the status it got. Requests for secrets such as .env, .git or wp-config, xmlrpc, injection patterns and scanner paths are counted as attacks, whatever name they send, and never as people. Each named bot is marked real, fake or unknown against the company’s published IP list. We keep only the network block, never the full address. The rules are on our methodology page.
Questions #
Do I need a WAF for a small site? #
It helps, because automated attacks do not care how small you are. Some CDNs include a free rule set; Cloudflare’s docs list one on all plans. Keep your software updated as well.
Can a WAF hurt my SEO? #
Yes, if it blocks or challenges Googlebot. Google says this can keep pages out of search. Check Security Events and URL Inspection after any change.
Will a WAF block AI crawlers? #
It can, if its bot settings say so. Decide which AI bots you want, then check with our tools.
Is a WAF the same as a firewall on my computer? #
No. A WAF reads web requests to one site: paths, headers and form data. It does not protect your office network.
What status code should a block send? #
For a temporary block, Google prefers 429 or 503. For a bot-challenge page, it strongly recommends 503.
Related words #
- DDoS attack
- Rate limiting
- Cloudflare blocking Googlebot
- Managed challenge
- Verified bots
- CDN
- Cloudflare Bot Fight Mode
- Block AI crawlers
Sources #
- Cloudflare Docs: Web Application Firewall (WAF), checked 24 November 2026
- Cloudflare Docs: WAF managed rules, checked 24 November 2026
- OWASP: Web Application Firewall, checked 24 November 2026
- Google Search Central Blog: Crawling December, CDNs and crawling (24 December 2024), checked 24 November 2026
- Google Search Central: Verifying Googlebot and other Google crawlers, checked 24 November 2026
- OpenAI: Overview of OpenAI crawlers, checked 24 November 2026
- Perplexity Docs: Perplexity crawlers, checked 24 November 2026
- MDN Web Docs: 403 Forbidden, checked 24 November 2026
- MDN Web Docs: 429 Too Many Requests, checked 24 November 2026
Updated 24 November 2026 by URSY.com.
Cite this page: Web application firewall (WAF). URSY. Updated 26 November 2026. https://ursy.com/wiki/web-application-firewall/ · Section links
Tools for this
- LiveImage SEO Checkeralt text, AVIF/WebP, sizes and licence markupRun the check →
- LiveCore Web Vitals Checkerreal-user speed and its historyRun the check →
- LiveSSL Certificate Checkerexpiry, chain and mixed contentRun the check →
- LiveSecurity Headers CheckerRun the check →
- LiveWhat is this site built with? (CMS, shop, analytics)Run the check →
- LivePrompt Injection Checkerhidden text or planted AI instructions on a pageRun the check →
- ProAI source mapWhich websites AI trusts in your topic (your outreach list)In URSY Pro →
- ProBot rules managerAllow / block each bot: robots.txt + firewall rules written for youIn URSY Pro →
- ProCookie-free analyticsVisits, pages, sources, without cookiesIn URSY Pro →