I have since added the localised version as canonical but Google Search Console insists that the version it picked as canonical (without /de) fits better.
Also I am wondering why https://example.com is indexed at all when it is redirected to either /de or /en anyway.
Maybe someone with more SEO knowledge can shed some light on this?
I just checked in our code and the automatic language redirect is using a 302. I’m not a SEO expert myself, but it might make sense to change that to a 301.
Thank you Bastian. We dug a little deeper and also found the 302 to be the likely reason for the issue.
Google recommends to set up a generic page with a language selector for https://example.com. That page should be referenced using the x-default hreflang attribute along with localised hreflang tags for each language version:
I’d like to avoid a language selector page and I’m not sure if there’s a provision for such a thing in Kirby’s auto-detection… I’m also interested in the impact of simply adding one of the localised versions, e.g. https://example.com/en as x-default.
Regarding 301 vs. 302 I found conflicting opinions on the web. 302 does seem standard practice for language redirects, though…