How to Fix Cloudflare HTTP 403 Blocking PerplexityBot, OAI-SearchBot & ClaudeBot
1. Why robots.txt Allow: / Still Produces HTTP 403 at the Edge
Every browser request passes through desktop Chrome TLS and JS challenges automatically. Automated crawlers like PerplexityBot, OAI-SearchBot, and ClaudeBot send lightweight HTTP fetches without executing browser challenges—so Cloudflare Bot Fight Mode or custom WAF rules drop them before your origin ever responds.
In ProofOfCite's live telemetry across our 11-protocol crypto benchmark and live DeFi sweeps, this silent mismatch appears repeatedly:
axis.to: Explicitly allowedPerplexityBoton line 143 ofrobots.txtand returned HTTP 200 to browsers, yet Cloudflare began serving a 25-byte HTTP 403 block toPerplexityBotin live Nov 19 probes.metric.xyz: Shipped a313 KBdocumentation file atdocs.metric.xyz/llms-full.txtfor AI agents while its root Cloudflare WAF still returned HTTP 403 toPerplexityBotdespiterobots.txtpermitting it.ember.so: Browsers received HTTP 200 androbots.txtpermitted AI bots, yet Cloudflare droppedPerplexityBot,GPTBot, andClaudeBotwith HTTP 403.
2. Step 1: Disable Cloudflare Managed robots.txt Overrides
Cloudflare's default AI Crawl Control feature often prepends a ~2.7 KB Managed Content-Signal header block to /robots.txt containing Disallow: / rules for GPTBot, ClaudeBot, CCBot, and Amazonbot—often without the engineering team realizing it replaced or wrapped their origin policy.
- Open Cloudflare Dashboard → Security → Bots → AI Crawl Control / Configure AI Audit.
- Turn OFF Managed robots.txt injection if you intend to publish a clean repository-controlled
/robots.txt. - Explicitly whitelist live search user-agents (
OAI-SearchBot,ChatGPT-User,PerplexityBot,Perplexity-User,Claude-SearchBot,Claude-User,Googlebot,Bingbot,Applebot).
3. Step 2: Deploy Priority #1 Verified-Bot Custom WAF Skip Rule
Navigate to Security → WAF → Custom rules → Create rule. Place the rule at Priority #1 (before Managed Rules & Bot Fight Mode) with Action set to Skip (checking Super Bot Fight Mode, Managed Rules, Security Level, and JS Detections).
Option A (Recommended — Allow Live AI Search & Indexing Bots Only):
(cf.client.bot and (http.user_agent contains "OAI-SearchBot" or http.user_agent contains "ChatGPT-User" or http.user_agent contains "PerplexityBot" or http.user_agent contains "Perplexity-User" or http.user_agent contains "Claude-SearchBot" or http.user_agent contains "Claude-User" or http.user_agent contains "Googlebot" or http.user_agent contains "Bingbot" or http.user_agent contains "Applebot"))
Option B (Optional — Also Exempt Model Training Crawlers):
(cf.client.bot and (http.user_agent contains "GPTBot" or http.user_agent contains "ClaudeBot" or http.user_agent contains "Google-Extended"))
4. Step 3: Post-Deploy Verification
After deploying the Skip rule, test live HTTP status and verify your homepage does not degrade to a browser-only shell without JS (see our React/Vite SSR & /llms.txt Guide). Note that local curl requests without verified Cloudflare ASN signatures will not trigger cf.client.bot, so also confirm real crawler hits inside Cloudflare Security → Events and run ProofOfCite's instant edge probe.
curl -i -s -A "PerplexityBot/1.0 (+https://perplexity.ai/perplexitybot)" "https://your-domain.com/" | head -n 25 curl -i -s -A "OAI-SearchBot/1.0 (+https://openai.com/searchbot)" "https://your-domain.com/" | head -n 25
5. Frequently Asked Questions
Why does PerplexityBot receive HTTP 403 when robots.txt explicitly sets Allow: /?
Cloudflare evaluates WAF rules, Bot Fight Mode, and AI Crawl Control at the CDN edge before reading your origin robots.txt. Across our 11-protocol crypto benchmark, 3 of 11 protocols permitted search crawlers in robots.txt while Cloudflare still returned HTTP 403.
Is matching http.user_agent alone safe for a Cloudflare WAF Skip rule?
No. Anyone can spoof a User-Agent header in curl. Always pair cf.client.bot AND http.user_agent contains so Cloudflare verifies the crawler IP/ASN signature before skipping WAF challenges.
Can we allow live AI search bots while still blocking model training bots?
Yes. OpenAI, Anthropic, and Perplexity publish separate user-agents for live user-triggered search retrieval (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, PerplexityBot) versus foundation model pre-training (GPTBot, ClaudeBot, CCBot).
Check if your Cloudflare WAF is silently returning HTTP 403
Probe 6 AI crawlers, robots.txt longest-match rules, raw HTML words, and /llms.txt DNS in 10 seconds.