Multi Language Website and Best Way for Auto Redirects

Multi Language Website and Best Way for Auto Redirects - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Multi Language Website and Best Way for Auto Redirects error on your web browser. Problem :


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 Page

  • example.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?


Solution :

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-Language header 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 to example.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-lang tags 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


We hope that this article has helped you resolve the seo, redirects, internationalization error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=