You can serve sitemap.xml.gz, but a wrong content-type makes crawlers download garbage.
Rules:
— ✅ File extension .xml.gz.
— ✅ Content-Type: application/x-gzip (or application/gzip).
— ✅ Do NOT also set Content-Encoding: gzip — that tells the client to decompress before reading, doubling the un-gzip.
— ✅ The 50 MB limit still applies to the uncompressed contents.
Checklist:
Step 1 — curl -I the .gz URL, read the content-type header.
Step 2 — Confirm it's served as a gzip file, not a gzip-encoded XML response.
Step 3 — Decompress locally and re-validate the XML.
Definition of done: the .gz downloads as a file, decompresses cleanly, and validates as a sitemap.
The Sitemap SOP
@SitemapSOP
Gzipped sitemaps: get the headers right
This post was published in the Telegram channel The Sitemap SOP (@SitemapSOP). All its posts are on the channel page.
Open on Telegram