: 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
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?
More posts by @Cooney921
2 Comments
Sorted by latest first Latest Oldest Best
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.
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.