Google Sitemaps Compression Error in Webmaster Tools

We create Sitemap XML files and point to them in Google Webmaster Tools, which sporadically provide the following error message for some files :

Compression Error

The “fix” in the Google documentation does not actually give any hint about what might be wrong .

The file is created in .NET and compressed by System.IO.Compression.GZipStream and through the Recommended Method of Using MSDN .

It works when we open the file in 7-zip and just save the file without any changes.

Any clues?

+4
source share
3 answers

OK, here are my thoughts on the problem. Obviously, it System.IO.Compression.GZipStreamcreates a file that is not corrupted, but still has minor problems that Google doesn't like.

Strightforward solution-and-check will be to switch to another compression library and see if that helps.

An even more difficult solution would be to rigorously test the specifications of the GZIP format . In particular, I would check (compare) the file headers (original and 7zip). Thus, you may find that it is wrong with the file and possibly fix it.

+1
source

+1 @Akash. IIS ( IIS 6) . IIS , XML .

0

.htaccess, . , , .htaccess.

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>


<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
  </FilesMatch>
</IfModule>

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
Hide result

, , woorank.com, , Gzip. , , Google ,

0

Source: https://habr.com/ru/post/1526760/


All Articles