How big can a robots.txt file be?
By TechCompare · Updated · How we check
Keep robots.txt under 500 KiB (512,000 bytes). Google ignores what's past that point.
Google reads the first 500 kibibytes of a robots.txt file and ignores everything after that. That's 512,000 bytes. A normal file is a few hundred bytes, so most sites never see the limit. Generated files with thousands of URL rules can pass it, and the rules at the bottom then do nothing.
How it works
RFC 9309 sets the floor for how much a crawler must read, and Google enforces exactly that size. Another crawler may read more, so one crawler can read a long file whole while another cuts it. The tester reads the first 512,000 bytes of the file and flags it when there's more. It ignores everything after the cut, the way Google does, so a rule that sits past it never shows up as the reason for a verdict. The rules at the bottom of a long file are the ones at risk.
Verdict
If the file is near the limit, shorten it before a rule falls off the end. Use patterns in place of long lists, delete rules for pages that no longer exist, and recheck. A file under the limit shows no cut notice in the tester, and every rule in it counts.
More Robots.txt scenarios
Frequently asked questions
Is 500 KiB the same as 500 KB?
Do other crawlers use the same limit?
Which rules are safe to remove?
Related tools
Open Graph Visualizer
Preview how your website links will look when shared on Google, Twitter, Facebook, and Discord.
Use toolSSL Checker
Check a site's certificate, TLS versions, HTTP/2 and HTTP/3 support, post-quantum key exchange, HSTS and redirects, or compare two sites.
Use toolDNS Lookup
Look up a domain's DNS records on Cloudflare or compare several resolvers at once, and read its SPF, DMARC and DKIM records in plain words.
Use tool