Allow traffic from search engine bots

Last updated Apr 16, 2026 This example custom rule challenges requests from a list of countries, but allows traffic from search engine bots — such as Googlebot and Bingbot — and from other verified bots.

The rule expression uses the cf.client.bot field to determine if the request originated from a known good bot or crawler.

  • When incoming requests match:
Field Operator Value Logic
Country is in Mexico, United States And
Known Bots equals false

If you are using the expression editor:
(ip.src.country in {"US" "MX"} and not cf.client.bot) - Then take action: Managed Challenge

Other resources

Was this helpful?

YesNo

On this page

Allow traffic from search engine bots - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/custom-rules/use-cases/allow-traffic-from-verified-bots/#page","headline":"Allow traffic from search engine bots","description":"Allow traffic from search engine and verified bots.","url":"https://developers.cloudflare.com/waf/custom-rules/use-cases/allow-traffic-from-verified-bots/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/custom-rules/use-cases/allow-traffic-from-verified-bots/og.png?v=e38f9bd010e48e03","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Block requests with high WAF attack scores. title: Block requests by attack score image: https://developers.cloudflare.com/waf/custom-rules/use-cases/block-attack-score/og.png?v=8c9007ba90dd09aa


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.