I do want to automatically redirect users based on the browser locale settings, but at the same time allow users to change their preference and store it.
- subdomains for specific languages (en.example.com, de.example.com, ...)
<link rel="alternate" hreflang="lang_code"... >for all language variations are included in the header of each page (excluding a
- The automatic redirect only happens on the 'root home page' on https://example.com and only contains a single seo hint:
<link rel="alternate" hreflang="x-default" href="http://www.example.com/" />
- Once a user has clicked on a button to change the language, this preference is stored in a cookie
This way when I visit example.com with a locale preference of "de-de", I get forwarded to de.example.com. I can then change the language to 'fr' via a button on the page. If I close the browser and visit example.com again I will be redirected to 'fr.example.com' because of the preference stored in the cookie.
Is this approach good in terms of SEO?