SEO problem, canonical URL's are always redirected #1035
Replies: 2 comments
-
To follow up on this:
|
Beta Was this translation helpful? Give feedback.
-
Hey @mikevercoelen, glad to hear if next-intl works well for you so far! 🙌
I guess you mean at the root See e.g.:
You might be interested in this discussion regarding canonical URLs: #629. The tldr; is that you shouldn't use canonical links but alternate links, which is what
Sorry, I can't follow. Can you provide an example curl for https://next-intl-example-app-router.vercel.app that shows this behavior?
You can generally compose the middleware and add any kind of custom functionality on top if you like. For convenience, Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi there, awesome library, we're building a reasonably sized e-commerce platform in the EU using this, and we're very happy with it.
We're currently stuck on an SEO problem and I hope someone can help us out.
We use
localePrefix: 'always'
+ localized path names +defaultLocale: 'cs' (Czech)
(not English, should we?)This is the issue:
i.e.
curl -L -H "Accept-Language: cs-CZ" -H "Cookie: NEXT_LOCALE=cs" https://example.com/cs
this works correctly, no redirect, however a crawler does not have a cookie.This also messes up canonical URL's, since a crawler follows a canonical URL, but since there's no cookie, it's redirected and canonical URL's should never have a redirect, which is considered bad.
Anyone got a clue?
Peace.
Beta Was this translation helpful? Give feedback.
All reactions