Skip to the content
Start free

robots.txt answers with a server error

When /robots.txt gives a 5xx error, Google stops crawling the whole site for a while, and other bots may treat every page as blocked.

High priority robots.txt

Why it matters #

Every well-behaved crawler asks for /robots.txt before it fetches anything else. The robots.txt standard (RFC 9309) says that when the file cannot be reached because of a server error, a crawler must assume it may fetch nothing. Google documents that it stops crawling the site for 12 hours, then uses the last copy it could read for up to 30 days.

So one failing file can stop new and changed pages being crawled across the whole site, for search engines and AI bots alike. Google treats 429 (too many requests) the same way here. The cause is often a firewall or bot shield that answers bots with an error, or a plugin that builds robots.txt and crashes.

How to fix it #

Check the status your server sends for /robots.txt. Make it answer 200 with your rules, or 404 if you have no rules. If a firewall or bot shield sends the error, add an exception so /robots.txt is always served.

If a plugin builds the file, switch it off for a moment to see whether the error stops, or upload a plain robots.txt file instead. Check again with the Robots.txt Checker.

  1. Check the status of /robots.txt with the Robots.txt Checker.
  2. Find what sends the error: the server, a plugin or a firewall.
  3. Make the address answer 200, or 404 if you have no rules.
  4. Check again, and watch the crawl stats report in Google Search Console.

What it looks like, and fixed #

The problem
GET /robots.txt HTTP/1.1
Host: www.example.com

HTTP/1.1 503 Service Unavailable
Retry-After: 3600

A 5xx answer for robots.txt makes Google pause crawling the whole site, and other bots may treat every page as blocked.

Fixed
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Sitemap: https://www.example.com/sitemap.xml

robots.txt answers 200 with plain text rules. If you have no rules, a 404 is fine too.

Fix it with your AI assistant #

Paste this into ChatGPT, Claude, Gemini or your coding agent. Fill in the words in [square brackets] first. It checks before it changes anything, changes only this, and tells you how to prove it worked.

Your instruction for the AI
My website [your website address] runs on [your platform, e.g. WordPress on nginx behind Cloudflare]. A check says /robots.txt answers with a server error (5xx), which can make Google pause crawling my whole site. First fetch [your website address]/robots.txt as a browser and as a bot, and show me the status codes and headers (or ask me to paste them). Explain in plain words what is most likely sending the error: the server, a plugin that builds the file, or a firewall or CDN rule. Then give me the simplest fix that makes /robots.txt always answer 200 with my current rules, for example a static robots.txt file in the site root or an exception in the firewall. Rules: keep my existing rules exactly, back up anything you change, and do not add new Disallow lines. Give me the exact steps or file, and where it goes. Finally, tell me to re-check with the URSY.com Robots.txt Checker at ursy.com/robots-txt-checker/.

We find the problems, and help you fix them

  1. Check Run a free tool or the full audit.
  2. Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
  3. Re-check Come back, check again, and watch each fix turn green.

How the AI Fix Pack works, with a sample to download

Fix it on your platform #

WordPress

WordPress builds robots.txt with PHP, so a broken plugin can make it fail. Upload a plain robots.txt file to the site root: the server then sends it without running WordPress.

Your server or hosting

Check the error log for requests to /robots.txt. Make sure no rewrite, rate limit or maintenance rule sends it to a script that can fail.

Your CDN (for example Cloudflare)

Check your CDN security events for /robots.txt and add an exception so no firewall, challenge or rate limit rule applies to it. Do not let the CDN cache an error answer for it.

Check it is fixed #

Run the URSY.com Robots.txt Checker (/robots-txt-checker/) a few times over a day. It should get 200 and your rules every time; then watch the crawl stats report in Google Search Console.

Official source #

RFC 9309: Robots Exclusion Protocol

Questions #

Is a 404 for robots.txt a problem?

No. A 404 tells crawlers you have no rules, so they may crawl everything. Only server errors and refusals cause trouble.

How long does the damage last?

Google documents that it stops crawling for 12 hours after a robots.txt server error, then may use its last good copy for up to 30 days while errors continue. Crawling returns to normal once the file answers properly again.

More problems in robots.txt

See every problem in the library

For AI assistants and developers: Instructions for AI · Developers · How to cite URSY.com