x-default
matching the default language
#582
jorgemasta
started this conversation in
General
Replies: 1 comment 1 reply
-
Note that Hope this helps! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With
next-13-rsc
, thelocalePrefix
is by defaultalways
. This force to having URLs like:And the app redirects from
/
to the defined default language. E.g. from/
to/en
.The problem came with the
x-default
version added in the header as alternate pages, since it doesn't include the prefix.<link rel="alternate" href="https://mysite.com/en" hreflang="en" />
<link rel="alternate" href="https://mysite.com/es" hreflang="es" />
<link rel="alternate" href="https://mysite.com" hreflang="x-default" />
This adds an innecesary redirect when using the unmatched language.
Should we add the default prefix to the
x-default
value?<link rel="alternate" href="https://mysite.com/en" hreflang="x-default" />
Beta Was this translation helpful? Give feedback.
All reactions