Multi Language Website and Best Way for Auto Redirects
let's assume we have a domain example.com that contains content for two languages (e.g. German and English).
The site itself is structured by folders, so the URLs for the language versions are:
example.com/de/-> German Pageexample.com/en/-> English Page
If someone now enters example.com in the browser I do not want to show a "select language page" that lets the user choose the language but an automatic detection of the browser language to redirect (301) to /de/ for German users and to /en/ for all others.
That is nothing special so far.
But I fear that search engines like Google will have problems indexing the url example.com. So instead of doing the automatic redirect (302) on that page, what about the following idea:
example.com does a 301 to example.com/en/ in any case and on the page example.com/en/ the language of the user is then detected. If the language is "German", another redirect (301) to example.com/de/ is made. Otherwise, nothing is done. One could even think about checking the referrer on example.com/en/ if it comes from example.com and only in that case, probe for the German language of the user. The advantage of that would be that a German user could actively switch to example.com/en/ without triggering another redirect back to the German version.
Is such as method for redirecting in a multi language page a good idea in regards to SEO terms?
Google doesn't index pages that redirect. If your domain home URL just has auto-detect redirect or "choose language" functionality, it isn't going to get indexed. But that is fine. You want your language sub-pages indexed in place of your domain home URL.
The best practice in a case like this is:
- Auto redirect from the home URL when a language preference can be determined either from the
Accept-Languageheader or from geographically locating the IP address. - If the language cannot be automatically determined on the home URL, show a menu that lets users select their language. In many cases bots don't have a preferred language set, so this menu lets bots easily find and crawl all your languages.
- NEVER auto-redirect from URLs for a specific language.
example.com/de/should never automatically redirect toexample.com/en/or the other way around. Any automatic language detection is imperfect and it is important to allow users to make language decisions on their own. At the most you could put a prominent notice on the page saying "Click here for the English version of this page." - Use
href-langtags in every page that is available in multiple languages to tell search engines about the others. - Provide a language selection widget on every page for users. It is common to put it in the header or the footer.
For more info see How should I structure my URLs for both SEO and localization?
Managing multi-regional and multilingual sites
https://developers.google.com/search/docs/advanced/crawling/managing-multi-regional-sites
Methods for indicating your alternate pages
https://developers.google.com/search/docs/advanced/crawling/localized-versions?hl=nl#methods-for-indicating-your-alternate-pages
Comments
Post a Comment