Mobile app version of vmapp.org
Login or Join
Cooney921

: Sitemap compressed is in unsupported format but valid if uncompressed I've build a sitemap_index pointing to different sitemaps "sitemap1.xml" If they are uncompressed, they are successfully validated

@Cooney921

Posted in: #Compression #GoogleSearchConsole #Nginx #Sitemap #XmlSitemap

I've build a sitemap_index pointing to different sitemaps "sitemap1.xml"
If they are uncompressed, they are successfully validated and accepted (Google Webmaster).

However, when compressed, they are not accepted.



I simply compressed them using gzip:

gzip sitemap1.xml


My server nginx is enabled to send compressed files.

This time I have not found useful the link in "Sitemap guidelines":
Which could be a possible error and how to check for it?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney921

2 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

I simply compressed them using gzip:
gzip sitemap1.xml

My server nginx is enabled to send compressed files.


It looks like you're trying to send a double-compressed file and a compressed file.

When you gzip a file and host it on a server that is set up to compress and send files, then you basically compressed the same file twice and when one level of decoding is done, what google sees instead of the xml contents is a bunch of garbage which really is the compressed file that you made using the gzip utility.

I would suggest disabling the compression mechanism in nginx for gz files, and compress the xml files as gz files then when google requests them, they're compressed properly. On my site, I have the sitemap index file as just a plain old XML file and then the sitemap files within it are compressed manually and without the server running the compression module.

10% popularity Vote Up Vote Down


 

@Berumen354

If you try to download your own sitemap files, e.g. example.xml.gz, most web browsers will correctly prompt you to download the compressed sitemap file.

However, if your webserver is not sending correct MIME headers for .gz files, some browsers may instead try open the sitemap file. This will fail as the internet browser has not correctly recognized the file format.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme