What happens when robots.txt returns a 5xx error?

By TechCompare · Updated · How we check

A 5xx on robots.txt means complete disallow under RFC 9309. Google stops crawling for the first 12 hours, then uses its last good copy of the file for up to 30 days.

When robots.txt answers with a 5xx error, a crawler can't tell what the rules are. RFC 9309 says to assume the worst: the whole site is off limits. Google stops crawling for a while and keeps retrying the file. A broken robots.txt can cost you more than a missing one.

Topic
Server error (5xx)
Server errors
Category
Missing or broken file
404, 403 and 5xx answers

How it works

RFC 9309 calls this case unreachable, and says the crawler must assume complete disallow. If the file stays undefined for a long time, for example 30 days, a crawler may treat it as unavailable or keep using a cached copy. Google's documentation gives the steps. For the first 12 hours it stops crawling the site but keeps trying to fetch the file. After that it uses the last good version for 30 days. With no cached copy it assumes no restrictions. Google says it may hold on to a cached copy longer than usual during timeouts or 5xx errors. The tester shows a 5xx as the whole site blocked for every crawler, with the status. It treats 429 the same way. Google lists 4xx codes except 429 as meaning no restrictions and doesn't say what it does with 429, so the tester takes the cautious side and says so. Typical causes are a rate limit or bot challenge in front of the file, an app route that fails on /robots.txt, and a deploy in progress.

Verdict

Treat robots.txt as a file that must always answer. Serve it as a plain static file, keep it out of rate limits and bot challenges, and recheck after each deploy. If the tester shows a 5xx or 429, fix that first, since no other rule matters while the file is down.

More Robots.txt scenarios

Block GPTBot
Two lines tell OpenAI's training crawler to stay out. Its search crawler and its page visits use other names.
View details
Google-Extended
A token for Gemini training, not a crawler. A rule for it never reaches Googlebot or Google Search.
View details
Block AI, keep search
Name each training crawler, leave Googlebot and Bingbot alone, and choose on purpose about the AI search bots.
View details

Frequently asked questions

Is a 5xx on robots.txt worse than a 404?
For crawling, yes. A 404 means no restrictions. A 5xx means crawlers should assume the whole site is off limits until the file answers again.
How long until Google crawls again after I fix it?
Google's page doesn't give a time for that. It says it keeps trying to fetch the file during the first 12 hours, and that it generally caches robots.txt for up to 24 hours.
Why does the tester block everything on a 429?
429 is the rate limit status. Google's page puts it outside the 4xx codes that mean no restrictions and says nothing more, so the tester takes the cautious reading. A rate limit that hits crawlers on robots.txt is worth fixing either way.