In short
A site can allow a crawler in its robots.txt and still return a 403 error, a 429 or a JavaScript challenge page to it. This check consists of requesting the same URL while presenting yourself as each crawler in turn (Googlebot, Bingbot, OAI-SearchBot, GPTBot, PerplexityBot, ClaudeBot…) and comparing the responses with the one a browser gets. The expected result: the same 200 code and an equivalent page size for every crawler you have decided to allow.
Why it matters
The robots.txt file expresses an intention. What the crawler actually gets depends on everything that sits between it and your application: CDN (Content Delivery Network), WAF (Web Application Firewall), web server rules, CMS security plugin, rate limiting. Each of these layers can filter on the user agent, that is, the string the crawler uses to identify itself.
A block at this level cannot be seen from a browser: you get a 200, the crawler gets a 403. AI crawlers do not solve JavaScript challenges or CAPTCHAs: faced with a verification page, they leave without any content. A page that is never fetched cannot be indexed by an AI search engine, read at a user's request, or cited.
Testing by user agent is the quickest way to detect these blocks. It has one important limitation, detailed below: it simulates the crawler's name, not its IP address.
What it improves
- Crawling Within minutes, you detect the blocks that prevent traditional search engine crawlers and AI crawlers from reading your pages.
- Citations in AI answers Indirect effect. An accessible page can be fetched and cited; nothing guarantees it will be.
- Policy consistency You check that the crawlers you want to refuse are refused, and only those.
- Diagnosis You know which layer responds (CDN, server, application) before opening a ticket with the hosting provider.
- Regression prevention Run again after every firewall or hosting change, the script flags a block introduced by mistake.
How to check
The minimal check takes two commands: the same URL requested as a browser, then as a crawler.
curl -s -o /dev/null -w "%{http_code} %{size_download} bytes %{time_total}s\n" -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" https://example.com/
curl -s -o /dev/null -w "%{http_code} %{size_download} bytes %{time_total}s\n" -A "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot" https://example.com/
Compliant result for an allowed crawler: two nearly identical lines.
200 48213 bytes 0.214s
200 48213 bytes 0.231s
A different code, or a 200 code with a much smaller size, indicates special treatment. To test all crawlers at once, use the script in the next section.
How to implement
Step 1 — Choose the URLs to test
At a minimum, test:
- the home page;
- one page of each important template (article, product page, category, service page);
/robots.txt: a crawler that cannot read it does not know your rules;- the XML sitemap;
- a URL you want to disallow, to check that the refusal works too.
The list of crawlers to test comes from your inventory: see list the AI crawlers you target (opens in a new tab).
Step 2 — Run the script
Save this script as test-robots.sh. It works with bash and curl, on Linux, macOS and WSL.
#!/usr/bin/env bash
# Usage: ./test-robots.sh https://example.com/page-to-test
set -u
url="${1:?Usage: $0 URL}"
body="$(mktemp)"
head="$(mktemp)"
trap 'rm -f "$body" "$head"' EXIT
baseline=0
printf '%-17s %-5s %-9s %-10s %s\n' "CRAWLER" "CODE" "BYTES" "TIME" "NOTE"
while IFS='|' read -r name ua; do
if [ -z "$name" ]; then
continue
fi
result="$(curl -s -o "$body" -D "$head" --max-time 20 -A "$ua" \
-w '%{http_code} %{size_download} %{time_total}' "$url")"
read -r code size time <<< "$result"
if [ "$baseline" -eq 0 ]; then
baseline="$size"
fi
note=""
if [ "$code" = "000" ]; then
note="no response (timeout or connection dropped)"
elif grep -qi '^cf-mitigated: *challenge' "$head"; then
note="Cloudflare challenge"
elif grep -qiE 'just a moment|verify you are human|attention required|access denied' "$body"; then
note="likely challenge or block page"
elif grep -qi '^retry-after:' "$head"; then
note="$(grep -i '^retry-after:' "$head" | head -n 1 | tr -d '\r')"
elif grep -qi '^location:' "$head"; then
note="$(grep -i '^location:' "$head" | head -n 1 | tr -d '\r')"
elif [ "$code" = "200" ] && [ "$size" -lt $((baseline / 2)) ]; then
note="response much lighter than the browser's"
fi
printf '%-17s %-5s %-9s %-10s %s\n' "$name" "$code" "$size" "${time}s" "$note"
sleep 1
done <<'EOF'
Browser|Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Googlebot|Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Bingbot|Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
OAI-SearchBot|Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OAI-SearchBot/1.4; +https://openai.com/searchbot
GPTBot|Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot
ChatGPT-User|Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot
PerplexityBot|Mozilla/5.0 (compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)
Perplexity-User|Mozilla/5.0 (compatible; Perplexity-User/1.0; +https://perplexity.ai/perplexity-user)
Claude-SearchBot|Mozilla/5.0 (compatible; Claude-SearchBot/1.0; +https://www.anthropic.com)
ClaudeBot|Mozilla/5.0 (compatible; ClaudeBot/1.0; [email protected])
Claude-User|Mozilla/5.0 (compatible; Claude-User/1.0; +https://www.anthropic.com)
EOF
Then:
chmod +x test-robots.sh
./test-robots.sh https://example.com/
./test-robots.sh https://example.com/robots.txt
The first line (browser) serves as the baseline. The script waits one second between requests so that it does not trigger rate limiting itself.
Good to know: the full strings and their version numbers change. OpenAI and Perplexity publish theirs; Anthropic documents the names of its crawlers but not a full string, so the ones in the script are approximations. Filters almost always match on the name (
GPTBot,ClaudeBot), which is enough for this test. Cross-check with the documentation listed under “Resources”.
Step 3 — Interpret the results
| Result | Likely meaning | Where to look |
|---|---|---|
| 200, size close to the browser's | The crawler receives the page. | Nothing to do. |
| 200, much smaller size | JavaScript challenge page, consent wall or lightweight version served to crawlers. | Open the response body: curl -s -A "…" URL | head -n 40. |
| 301 or 302 | Redirect: to a login page, another country or another language. | See make public pages accessible without logging in (opens in a new tab). |
| 401 | Authentication required. | Normal on staging, abnormal on a public page. |
| 403 | Refused by a server rule, the WAF or a security plugin. With the cf-mitigated: challenge header, it is a Cloudflare challenge. |
See fix unjustified 403s (opens in a new tab). |
| 406 | Refused by ModSecurity, common on shared hosting. | Server error log or the hosting provider's support. |
| 429 | Rate limiting triggered. | See check rate limits (opens in a new tab). |
| 503 | Maintenance, overload, or a block that some firewalls disguise as unavailability. | Compare with the browser line: if it gets a 200, it is filtering. |
| 000 | Connection dropped without a response (for example return 444 on Nginx) or timeout. |
Server rules and network firewall. |
Two useful readings:
- All crawlers are treated like the browser: no filtering by user agent. Filtering by IP remains to be checked (step 4).
- Only some crawlers are refused: a rule names them. Check that it matches your policy: blocking GPTBot (training) is a legitimate choice, blocking OAI-SearchBot (search) removes you from ChatGPT's search results.
Step 4 — Know the limits of the test
The script changes the crawler's name, not the address the request comes from. This leads to two misreadings.
- False block: a firewall that verifies crawler identity sees a “Googlebot” request coming from your connection and blocks it as spoofing. The real Googlebot gets through. Cloudflare and most managed WAFs perform this check for verified bots.
- False all-clear: a firewall that blocks data center address ranges, countries or autonomous systems does not react to your test, since you come from a residential or office address. The real crawler is blocked.
So always confirm with a source that sees the real crawler:
- The logs: look for the codes returned to real crawlers. See analyze AI crawler logs (opens in a new tab).
- The search engines' tools: the URL Inspection tool in Google Search Console (“Test live URL”) and its counterpart in Bing Webmaster Tools send a request from the search engine's infrastructure.
- A real fetch test: in ChatGPT, Perplexity or Claude, ask the assistant to read a specific URL on your site and summarize it, then look for the matching request in your logs. If the assistant replies that it cannot access the page, note the code recorded on the server side.
Warning: only test your own sites. Repeatedly sending requests to a third-party site under a crawler's identity can be treated as an attempt to bypass its protections.
Step 5 — Find the layer that blocks
Query the origin directly to find out whether the refusal comes from the CDN or the server:
curl -s -o /dev/null -w "%{http_code}\n" -A "GPTBot" --resolve example.com:443:ORIGIN_IP_ADDRESS https://example.com/
If the origin responds with a 200 and the public URL with a 403, the block is in the CDN or the WAF. The following subsections indicate where to look for each environment.
Apache
Versions Apache 2.4.
Look for rules that filter on the user agent in the configuration and in .htaccess files:
grep -rniE "HTTP_USER_AGENT|BrowserMatch|SetEnvIf.*User-Agent|GPTBot|ClaudeBot|PerplexityBot" /etc/apache2/ /var/www/example/.htaccess
The common forms are a RewriteCond %{HTTP_USER_AGENT} followed by a RewriteRule … [F], or a SetEnvIfNoCase User-Agent … bad_bot combined with Require not env bad_bot. Remove the crawlers you want to allow from the list, then reload: sudo apachectl configtest && sudo systemctl reload apache2. If ModSecurity is active, the refusal appears in the error log with the rule ID.
Nginx
Versions Nginx 1.18 and later.
grep -rnE "http_user_agent|limit_req|return (403|429|444)" /etc/nginx/
Blocks are usually found in a map $http_user_agent or an if ($http_user_agent ~* …). Fix them, then run sudo nginx -t && sudo systemctl reload nginx.
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026.
Open Security > Analytics, “Events” tab, and filter on the crawler's user agent: each blocked or challenged request shows the service responsible (custom rule, managed rule, bot protection, rate limiting). Also check the AI crawler blocking setting in the bot security settings and the AI Crawl Control page, which lists AI crawlers and the action applied to each one. The details are covered in check CDN, Cloudflare and WAF (opens in a new tab).
AWS
Versions AWS WAF (console and Bot Control managed rule group), November 2026.
In the AWS WAF console, open the web ACL associated with CloudFront or the Application Load Balancer, then the sampled requests overview: filter on the BLOCK action and read the rule that was triggered. If the Bot Control managed rule group is enabled, check its CategoryAI rule: unlike the other categories, it blocks all AI bots by default, verified or not. Switch it to count mode if you want to let AI search crawlers through.
Plesk
Versions Plesk Obsidian 18.0.
Two common sources of blocking: the ModSecurity web application firewall (Tools & Settings > Web Application Firewall (ModSecurity)) and Fail2ban (Tools & Settings > IP Address Banning (Fail2Ban)), some of whose rules target “bad bots”. Check the list of banned addresses and the domain's logs (Websites & Domains > Logs).
cPanel
Versions cPanel & WHM with the Jupiter theme, November 2026 versions.
Check Security > ModSecurity (which can be disabled per domain for the duration of a test), Security > IP Blocker and the public_html/.htaccess file, where plugins or old settings may have added lists of refused crawlers.
Shared hosting
Some hosting providers filter crawlers at the level of their infrastructure, beyond your reach. If the .htaccess file contains no rule and the script shows a 403 or a 406 for a specific crawler, send the script output to support and ask which rule applies and whether it can be lifted for your domain.
WordPress
Versions WordPress 6.4 to 7.1, with the versions of security plugins available in November 2026.
Security plugins (Wordfence, Solid Security, All-In-One Security, Sucuri) ship with lists of blocked crawlers and rate limits. Temporarily deactivate the plugin, run the script again, then reactivate it and adjust the rule at fault. The “block AI crawlers” options in SEO plugins usually modify the robots.txt file, not the HTTP response: they do not change the result of this test.
Vercel
Versions Vercel Firewall, all plans, November 2026.
In the project, open Firewall: denied traffic is listed there with the rule applied. Check the bot management configuration, in particular the ruleset dedicated to AI bots, and Attack Challenge Mode if it is active.
Netlify
Versions Netlify interface, all plans, November 2026.
Netlify does not block crawlers by default. A block usually comes from an Edge Function or a firewall rule you added: check the netlify/edge-functions folder and the project's security rules.
Common mistakes
- Drawing conclusions from the user agent test alone: it sees neither IP-based blocks nor exemptions granted to verified bots. Cross-check with the logs.
- Testing only the home page: firewall rules often target specific paths (internal search, API, product pages).
- Forgetting
/robots.txt: if it returns a server error to the crawler, the crawler may suspend crawling of the whole site. - Trusting the 200 code: a challenge page can respond with a 200. Always compare the size with the browser's.
- Running the test from the server itself: the request bypasses the CDN and the WAF. Test from outside.
- Confusing an intended refusal with an accidental block: a 403 for GPTBot is compliant if you refuse training. Compare each line with your written policy.
- Testing only once: managed rules in CDNs and plugins change without you. Run the script again after every update, or monitor HTTP status codes continuously (opens in a new tab).
Frequently asked questions
How do I test whether my site blocks GPTBot?
Request the same URL twice with curl, once with a browser's user agent and once with GPTBot's, then compare the HTTP code and the response size. Identical results indicate that no rule filters on that name. A 403, a 429 or a much lighter response reveals special treatment. Then confirm in the logs, because the test does not reproduce the crawler's IP address.
Why does my curl test return a 403 when the real crawler gets through?
A firewall that verifies crawler identity sees a “Googlebot” or “GPTBot” request coming from your connection and blocks it as spoofing, while letting the real crawler through from its own addresses. Cloudflare and most managed WAFs perform this check for verified bots. The user agent test is therefore not enough: the logs and the search engines' URL inspection tools see the real crawler.
Does a 200 code prove that the crawler receives my page?
No, a 200 code does not prove that the crawler receives your page: a JavaScript challenge page, a consent wall or a lightweight version can be served with that code. Always compare the response size with a browser's, and open the response body if the gap is large. AI crawlers solve neither JavaScript challenges nor CAPTCHAs.
Should I test pages other than the home page?
Yes, test one page of each important template (article, product page, category, service page), as well as /robots.txt, the XML sitemap and a URL you want to disallow. Firewall rules often target specific paths, such as internal search, APIs or product pages, which a test limited to the home page does not reveal. Run the script again after every configuration change.
Resources
- OpenAI: crawlers and user agentsdevelopers.openai.com
- Perplexity: crawlers and IP rangesdocs.perplexity.ai
- Anthropic: Claude's crawlers and how to control themsupport.claude.com
- Google: list of crawlersdevelopers.google.com
- Bing Webmaster Toolsbing.com
- curl: variables for the --write-out optioncurl.se
- Cloudflare: challenge pages and the cf-mitigated headerdevelopers.cloudflare.com
Updated on
Topic checklist (PDF)