AI crawler blocked? Fixing 403, 404 and 405 errors for GPTBot, ClaudeBot and PerplexityBot

Last updated

The short answer

To fix a 403 or 405 error for an AI crawler, find out what is refusing it (your CDN's bot settings, a security plugin, your host's firewall, or a server rule that rejects some request types) and allow the crawlers you want by their verified identity. For a 405, first test a normal request and a quick "HEAD" request separately: if only HEAD fails, the fix is one server setting (step by step below).

A 403 Forbidden means the server refused the request; a 405 Method Not Allowed means it doesn't accept that kind of request for the page. When an AI crawler such as GPTBot, ClaudeBot or PerplexityBot gets one but an ordinary browser gets the same page, something in front of your site is usually refusing the crawler: a CDN's bot protection (such as Cloudflare), a security plugin, or your host's firewall. It is not caused by robots.txt. Decide which crawlers you want in (the ones that power AI answers matter most), check your server or CDN logs to confirm the block is real rather than a test being refused, then allow those crawlers by their verified identity.

What 403, 405, 429 and a bot check mean

Which crawlers to let in

AI companies run separate crawlers for separate jobs. The ones that matter for being found in answers:

CompanyFor AI answers and searchWhen a user asks about a pageFor model training
OpenAIOAI-SearchBotChatGPT-UserGPTBot
AnthropicClaude-SearchBotClaude-UserClaudeBot
PerplexityPerplexityBotPerplexity-UserNone listed

Let the answer and user crawlers in if you want to be read and cited. The training crawlers are your choice: OpenAI and Anthropic control training separately from search, so blocking GPTBot or ClaudeBot doesn't keep you out of their answers.

Real block or false alarm?

Anyone can send a request that claims to be GPTBot by copying its user-agent text. Good bot protection checks where the request really comes from and refuses fakes. So a test from your own computer, or from a checker, that only copies a crawler's name can be refused while the real crawler gets in. Before changing anything:

  1. Look for the real crawler's visits in your CDN's security or analytics log, or your host's access log. Search for the crawler's name and note the response code it got.
  2. Compare the visiting address with the crawler's published IP addresses. OpenAI lists them for each crawler (for example openai.com/searchbot.json and openai.com/gptbot.json), and Perplexity lists its own on its crawlers page.
  3. If real visits from those addresses get 403, 405, 429 or a bot-check page, the block is real.

Where the block usually comes from

How to fix it

  1. Cloudflare: go to Security, then Settings, filter by Bot traffic and open AI Crawler and Agent access policies. Set Search and Agent to Allow (do not block). Training is your choice. Then check Security Events for any other rule still blocking them, and exempt verified bots from bot-fighting and rate-limiting rules rather than turning protection off.
  2. Security plugin: open its log of blocked requests, find the AI crawler, and allow it. Prefer an option that verifies the crawler or its IP addresses over allowing a user-agent name on its own.
  3. Host firewall: ask your host's support to allow the named crawlers, and send them the links to the published IP lists above.
  4. 405 on ordinary pages: make sure your pages accept GET and HEAD requests, and that no rule answers bots with 405. Fixing a 405, step by step.
  5. Robots.txt too: while you are there, make sure it doesn't disallow the same crawlers. See the robots.txt guide and why AI assistants can't see your site.

Then run the AI crawler checker again and watch your logs for the crawler's next visits getting a 200.

Fixing a 405 error, step by step

A 405 has two possible causes, and a simple test tells them apart. Some crawlers, link checkers and link previews first check a page with a HEAD request (the page's headers without its content), then fetch it with a normal GET. Web servers accept both by default, so a 405 means a setting or rule was added along the way.

1. Test it. Run these from a terminal (on Windows, type curl.exe instead of curl). Each line prints only the status code:

# 1. A normal request (GET) with an AI crawler's name: prints the status code
curl -s -o /dev/null -w "%{http_code}\n" -A "OAI-SearchBot" https://yoursite.com/
# 2. The quick check (HEAD) with the same name
curl -s -I -o /dev/null -w "%{http_code}\n" -A "OAI-SearchBot" https://yoursite.com/
# 3. The same two without a crawler's name, to compare
curl -s -o /dev/null -w "%{http_code}\n" https://yoursite.com/
curl -s -I -o /dev/null -w "%{http_code}\n" https://yoursite.com/

2. Read the result.

What you seeWhat it meansWhere to fix it
GET 200, HEAD 405, with or without the crawler's nameYour server refuses HEAD requests for everyone.A server setting: see step 3.
200 without the crawler's name, 405 with itA rule answers bots with 405.Your CDN, security plugin or host firewall: see How to fix it.
405 on GET for everyone, on that address onlyThe address isn't a page (a form handler, say) and only accepts form submissions.Nothing to fix on the server; make sure your links and sitemap point to real pages.

A test that copies a crawler's name can be refused where the real crawler is let in (see real block or false alarm), so confirm in your logs before changing settings.

3. Let HEAD through. Find the rule that refuses it and add HEAD next to GET:

4. Check again. Re-run the test, then the free AI crawler checker, and watch your logs for the crawler's next visits getting a 200.

404 errors for AI crawlers

A 404 Not Found means the address doesn't exist (MDN). Seeing some in your logs for AI crawlers is normal. What matters is which addresses they are:

Can AI crawlers read your pricing and service pages?

Being let in is half of it. A crawler also has to find your words in what your server sends. That matters most on the pages where people decide: pricing, services, booking, contact, and reviews. Check those pages, not just the homepage:

  1. View the page source (Ctrl+U in most browsers, or right-click › View page source) and search for your prices, service names and phone number. If they are on screen but not in the source, they appear only after JavaScript runs, and a crawler that doesn't run JavaScript won't see them. Google renders JavaScript (Google Search Central); don't assume every AI crawler does.
  2. Request the page as a crawler from a terminal. The first line prints the status code (you want 200); the second shows whether your text is in what the crawler receives:
# What does an AI crawler get from your pricing page? (status code, then the first text)
curl -s -o /dev/null -w "%{http_code}\n" -A "OAI-SearchBot" https://yoursite.com/pricing
curl -s -A "OAI-SearchBot" https://yoursite.com/pricing | grep -i "your price or service name"

A test like this only copies the crawler's name, so bot protection may refuse it while the real crawler gets in; see real block or false alarm. If the page answers 200 and your text is there, that page is readable.

  1. Run the free tools. The AI crawler checker requests your page as each AI crawler. The free scan compares how your key pages answer an AI crawler and a browser, and checks how much of your homepage text is in the HTML your server sends.

If the text is missing, ask your developer or platform about server-side rendering or pre-rendering, so the words are in the page your server sends. See why AI assistants can't see your website for the other causes.

Checklist

Questions people ask

What does a 405 error mean for GPTBot or ClaudeBot?
Your server, or something in front of it, refused the crawler's request with "405 Method Not Allowed". Either the server doesn't accept that type of request (often a HEAD request, a quick check without the page's body), or a firewall or security plugin answers bots with 405 instead of 403. Either way the crawler gets nothing from that page.
Does a 405 error stop ChatGPT from citing my website?
It can. If the crawlers that feed AI answers (OAI-SearchBot for ChatGPT search, Claude-SearchBot, PerplexityBot) get a 405 instead of your page, they can't read it, so the assistant has nothing from that page to quote or recommend. A 405 for the training crawlers (GPTBot, ClaudeBot) doesn't affect answers.
Why do crawlers send HEAD requests?
A HEAD request asks for a page's headers without its content: a cheap way to check whether a page exists or has changed before fetching it. Crawlers, link checkers and link previews use it. Web servers allow HEAD by default, so a 405 on HEAD usually means a setting or rule added later.
Is a 405 error worse than a 403?
For a crawler, the result is the same: no page. The difference is the cause. A 403 is almost always a block on who is asking; a 405 is either a block or a server that refuses a type of request, which you can tell apart by testing a normal request and a HEAD request, as shown on this page.
Can robots.txt cause a 403 error?
No. robots.txt is a request that well-behaved crawlers follow; a crawler that obeys it simply doesn't ask for the page. A 403 or 405 is your server, host or firewall actively refusing a request.
Should I let GPTBot and ClaudeBot in?
That is a business choice. They collect pages that may be used to train AI models. Blocking them doesn't stop ChatGPT or Claude citing you in answers, because OpenAI and Anthropic use separate crawlers (OAI-SearchBot and Claude-SearchBot) for that.
Is it safe to allow AI crawlers through my firewall?
Yes, if you allow the real ones. Allow verified bots or the crawler's published IP addresses rather than anything that claims the name, since anyone can copy a crawler's user-agent text.
Why does a checker say I'm blocked when the real crawler isn't?
Good bot protection refuses requests that claim to be a crawler but come from the wrong address. A test that only copies the crawler's name can be refused when the real crawler is let in. Check your server or CDN logs for the real crawler's visits.
Why do AI crawlers get 404 errors on my site?
Usually because they ask for addresses that no longer exist: pages that were renamed or removed, old links from other sites, or optional files such as llms.txt. A 404 on a page that loads fine for visitors is different: it means your server answers bots, or requests without JavaScript, differently, and that needs fixing.
How can I check whether AI bots can read my pricing and service pages?
Open the page, view its source (Ctrl+U in most browsers) and search for your prices and service names. If they aren't in the source, a crawler that doesn't run JavaScript won't see them. Then request the page with an AI crawler's name, or run the free AI crawler checker, and check it answers 200 with the same text.
How do I know the fix worked?
Run the AI crawler checker again, and look in your CDN or server logs for later visits from the crawler that now get a 200 response.

What the free scan checks for this

These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.

Sources

Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.

  1. OpenAI: Overview of OpenAI crawlers
  2. Anthropic: Does Anthropic crawl data from the web, and how can site owners block the crawler?
  3. Perplexity: Perplexity crawlers
  4. Cloudflare: AI Crawler and Agent access policies
  5. MDN: 403 Forbidden
  6. MDN: 405 Method Not Allowed
  7. MDN: 404 Not Found
  8. Google Search Central: Understand the JavaScript SEO basics