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.

Topic
Sitemap size limits
Size limits
Category
Sitemaps
Limits, dates and the Sitemap line

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

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

Does gzip raise the 50 MB limit?
No. The limit applies to the file once it's uncompressed. A .xml.gz file can be small on disk, but its content still has to stay under 50 MB and 50,000 URLs.
Does Google read RSS or text sitemaps?
Yes. Google supports XML, RSS and Atom feeds, and text files with one URL per line, with the same limits. The tester reads XML sitemaps and index files only.
Why did the tester read only some of my sitemaps?
It reads up to 5 sitemaps listed in robots.txt and up to 5 child sitemaps from indexes, and says how many it left out. That keeps one check from fetching hundreds of files from your server.