What are the size limits for a sitemap?
By TechCompare · Updated · How we check
50,000 URLs or 50 MB uncompressed per file, whichever comes first. A sitemap index can list up to 50,000 sitemaps, and gzip doesn't raise the 50 MB limit.
A sitemap file can list at most 50,000 URLs, and the file can't be larger than 50 MB (52,428,800 bytes) once it's uncompressed. Whichever limit you hit first is the one that counts. Bigger sites split their URLs over several files and list those files in a sitemap index.
How it works
The sitemaps.org protocol sets both limits, and Google's documentation repeats them for every format it supports. The protocol allows gzip files, but the cap applies to the size once uncompressed. The tester reads the sitemaps your robots.txt lists, or tries /sitemap.xml when it lists none, and says that was a guess. It follows index files to some of their child sitemaps. For each file it shows the URL count, the size and a flag when either limit is passed. A site with hundreds of child sitemaps gets a sample report, not a full one. The tester downloads up to 10 MB per sitemap and 50 MB for all of them together, so a big file that isn't compressed is only read in part, and the report says so. A gzipped file is read up to the full 50 MB once unpacked, as long as its download fits in 10 MB. A raw ampersand in a URL breaks XML, since the protocol says all data values must be entity escaped, and the tester reports the line where parsing failed.
Verdict
Split before you hit a limit, not after. Group URLs by section or by date, keep each file well under 50,000 URLs, and list every file in one sitemap index that robots.txt points to. Then run the check and look at the count and size of your biggest file.
More Robots.txt scenarios
Related guides
Frequently asked questions
Does gzip raise the 50 MB limit?
Does Google read RSS or text sitemaps?
Why did the tester read only some of my sitemaps?
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