Crawling and robots.txt · robots.txt file

robots.txt over 500 KiB

Google reads only the first 500 KiB of a robots.txt file, so any rules after that point are ignored and never applied.

How this page is built

The robots.txt file on the test host is about 600 KiB. Its Sitemap line comes first, followed by 14,000 valid Disallow lines for old archive addresses, so the rules near the end of the file fall outside the first 500 KiB.

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

Google reads only the first 500 KiB of a robots.txt file and ignores the rest. Rules after that point are never applied, so the addresses they were meant to block can still be crawled. Nothing in Search Console warns that the file has been cut short.

Very large files usually come from a system that writes one rule for every old or unwanted address. They are also hard for people to read and check.

How to check it

Check the size of the robots.txt file in the browser’s network panel or with a command such as curl -sI. Google’s robots.txt report in Search Console shows the size it fetched. 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

Replace long lists of single addresses with a few rules for whole folders, and use the * and $ wildcards to match patterns. Keep the file well under 500 KiB.

Back to all tests