Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should sitemap index contain child sitemaps with .gz extension?

Question: Is it required to have .gz extension for child sitemaps or not?

This is what I found:

Google provides the following sitemap index example:

<?xml version="1.0" encoding="UTF-8"?>
   <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <sitemap>
      <loc>http://www.example.com/sitemap1.xml.gz</loc>
      <lastmod>2004-10-01T18:23:17+00:00</lastmod>
   </sitemap>
   <sitemap>
      <loc>http://www.example.com/sitemap2.xml.gz</loc>
      <lastmod>2005-01-01</lastmod>
   </sitemap>
   </sitemapindex>

Very similar example can be found on sitemaps.org. As per sitemaps.org:

<loc> - Identifies the location of the Sitemap. This location can be a Sitemap, an Atom file, RSS file or a simple text file.

Both examples don't specify anything about .gz and I couldn't find any sitemap index example that doesn't contain .gz. However, all child sitemaps in my case are not gzipped and I'm wondering whether it's right way of doing it or not.

like image 339
skryvets Avatar asked Sep 17 '25 14:09

skryvets


1 Answers

No, gzipping the files is not necessary. From the Sitemaps.org Protocol:

If you would like, you may compress your Sitemap files using gzip to reduce your bandwidth requirement…

Google themselves reference uncompressed Sitemap files: https://www.google.com/sitemap.xml

like image 157
GDVS Avatar answered Sep 21 '25 21:09

GDVS