diff --git a/packages/volto/news/6561.bugfix b/packages/volto/news/6561.bugfix new file mode 100644 index 0000000000..def9b0aaf9 --- /dev/null +++ b/packages/volto/news/6561.bugfix @@ -0,0 +1 @@ +Stop generating sitemap.xml.gz @reebalazs \ No newline at end of file diff --git a/packages/volto/src/express-middleware/sitemap.js b/packages/volto/src/express-middleware/sitemap.js index 59bf641c8f..cb477f07e1 100644 --- a/packages/volto/src/express-middleware/sitemap.js +++ b/packages/volto/src/express-middleware/sitemap.js @@ -50,7 +50,8 @@ export const sitemapIndex = function (req, res, next) { export default function sitemapMiddleware() { const middleware = express.Router(); - middleware.all('**/sitemap.xml.gz', sitemap); + // Do not deliver the old sitemap.xml.gz as it might cause issues if Google parses it + // in addition to the sitemap-index.xml. middleware.all('**/sitemap:batch.xml.gz', sitemap); middleware.all('**/sitemap-index.xml', sitemapIndex); middleware.id = 'sitemap.xml.gz';