Crawling and robots.txt · robots.txt file

robots.txt returns 5XX or times out

If Google cannot fetch robots.txt because of a server error, it may stop crawling the site until it can.

How this page is built

The robots.txt address on the test host returns a 500 Internal Server Error. The rest of that host works normally: its home page returns a 200 status code.

The test host is robots-groups.techseotests.com, and its file is at https://robots-groups.techseotests.com/robots.txt. A host has only one robots.txt file, so this test has a subdomain of its own. Every other address on that subdomain redirects back to this site.

Why it matters

Before it crawls a host, Google fetches its robots.txt file. A 404 means nothing is blocked, but a server error or a timeout means Google cannot tell what the file says. To be safe, it treats the whole host as blocked and stops crawling it.

If the problem lasts, Google falls back to a cached copy of the file, and after a long outage it may crawl as if there were no rules at all. Either way, new and changed pages are not crawled while the error lasts.

How to check it

Request the robots.txt file and check the status code in the browser’s network panel or with curl -sI. Google’s robots.txt report in Search Console shows fetch errors. Crawl tools only read a robots.txt file for the hosts they crawl. Set the crawl to follow links to subdomains, or start a crawl at the subdomain, and look at the robots.txt report.

How to fix it

Make sure robots.txt is served as a static file that returns a 200 status code quickly, even when the rest of the site is under load. Check that firewalls and content delivery networks do not block or slow it.

Back to all tests