i18n icon indicating copy to clipboard operation
i18n copied to clipboard

[strictSeo] canonicals do not respect trailingSlash config

Open francislg2 opened this issue 1 month ago • 0 comments

Environment


  • Operating System: Darwin
  • Node Version: v22.14.0
  • Nuxt Version: 3.19.3
  • CLI Version: 3.29.3
  • Nitro Version: 2.12.8
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

@nuxtjs/i18n": "^10.2.1"

Reproduction

There seems to be an issue with Stackblitz. I was not able to create a reproduction.

But it should be pretty easy to replicate:

  1. in nuxt.config, set the configs
{
  i18n: {
    experimental: {
      strictSeo: true
    },
    trailingSlash: true,
  }
}
  1. run the dev server
  2. go on any route other than the home page
  3. look for the canonical link in the head of the DOM
  4. you should see urls without trailing slashes

Describe the bug

When using the strictSeo mode, it seems like the i18n.trailingSlash config is not respected.

For example, if I have trailingSlash: true, the canonicals will still output "/products" instead of "/products/"

Additional context

No response

Logs


francislg2 avatar Dec 05 '25 21:12 francislg2