Bootflux
Bootflux

Reputation: 27

Multilingual website and url redirection to the default language chosen by me

I have a website with two languages, English and Russian. My domain url for each language will be as such: www.mydomain.com/en/ and www.mydomain.com/ru/

How do I redirect visitors to www.mydomain.com/en/ when they type: www.mydomain.com

How will my url be shown in google search, will it be shown as: www.mydomain.com OR www.mydomain.com/en/

Upvotes: 0

Views: 2335

Answers (1)

redelschaap
redelschaap

Reputation: 2814

I cannot give you the answer on how you have to redirect visitors to the right domain (from a technical point of view). That depends on the system (WordPress, Joomla, Magento or none at all) and the programming language you use (PHP, ASP.Net).

Edit: how to determine what language to show:

There are two ways to determine what language version to redirect your visitors to. You can base it on the browsers' language using the Accept-Language request header or you can get the location from the user's ip address and use the main language of that country. Maybe a combination of both would be the best solution.


I can however tell you how your URL's will be shown in Google. First you have to decide how you want Google to show them.

Some sites use their domain root (www.domain.com) as a simple page where users can define the language, and send them to the right language folder (www.domain.com/en/ or www.domain.com/ru/). Others use their domain without a language folder as the version for the main language of their country and use folders for other languages.

Two other solutions are to use subdomains (ru.domain.com or de.domain.com) or to use different domains (www.domain.com and www.domain.ru) for all (other) languages.

Which way you choose, make sure you never have two versions of one language! For SEO reasons, you cannot have the English version on www.domain.com AND www.domain.com/en/.

Once you have chosen your way of serving (other) languages, you have to tell search engines what language you webpage is in. You can also link to the same content in other languages. Put the following tags in the <head></head> section of your webpages:

<head>
    <meta http-equiv="content-language" content="nl_NL">
    <link hreflang="en" href="http://www.domain.com/ru/" rel="alternate">
</head>

Also adjust your <html> tag:

<html lang="nl"><head>...</head><body>...</body></html>

Edit: How to get your different versions in Google

When using different (sub)domains, you can notify Google about all of them Google Search Console (new name of Google Webmaster Tools). If you prefer to use folders, you can add your main domain to Google Search Console and let your <link hreflang="..." ...> tags do the work for you. You also might want to make seperate sitemaps for each language and notify Google about them in Search Console.

Upvotes: 4

Related Questions