<b>Gzipped sitemaps: get the headers right</b>
You can serve <code>sitemap.xml.gz</code>, but a wrong content-type makes crawlers download garbage.
Rules:
— ✅ File extension <code>.xml.gz</code>.
— ✅ <code>Content-Type: application/x-gzip</code> (or <code>application/gzip</code>).
— ✅ Do NOT also set <code>Content-Encoding: gzip</code> — 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 — <code>curl -I</code> 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
<b>Gzipped sitemaps: get the headers right</b>
Этот пост опубликован в Telegram-канале The Sitemap SOP. Подписаться можно по ссылке: @SitemapSOP.