nuxt-community/sitemap-module

URLs are missing trailing-slash at the end

ma-vo opened this issue · 2 comments

ma-vo commented

Your auto-generated sitemap creates URLs which lead to sites of the status 301 (permanently redirected). This lead to confused or even broken crawlers. Most of the crawlers are expacting a status of 200 (ok).

This URL is generated by your module:
https://DOMAIN.com/subpage
This URL would be correct
https://DOMAIN.com/subpage/

The ending trailing-slash is mandatory.

Nuxt 2.x generate each route without trailing-slash by default. the root cause is not about the sitemap module.

But the module have a trailingslash option to handle that (and read details about 301 in the docs):
https://sitemap.nuxtjs.org/usage/sitemap-options#trailingslash-optional---boolean

ma-vo commented

Great! Missed that option. Thanks @NicoPennec