Next.js Discord

Discord Forum

Issues with canonical url generated by NextJs metadata convention when used with react-i18next

Unanswered
Greis posted this in #help-forum
Open in Discord
I really home someone in here can help me. Im trying to wrap my head around generating language specific canonical urls for my website. I ended up with something that works locally when inspecting html (correct canonical urls for all languages where defaultLocal url has no language specific, but other languages have). However I see another behaviour when deploying to production hosted on Vercel (defaultLocale generated canonical includes language in url).

To avoid duplication I will refer to my question on Stackoverflow where I have provided in-depth explanation as well as relevant code snippets.

Link to my question: https://stackoverflow.com/q/78573889/7442394

I really hope someone in this community can provide some assistance.

Kind regards

Morten

0 Replies