When I set up a site in multiple languages, how should I set up my URLs for search engines and usability?
Let's say my site is
www.example.com, and I'm translating into French and Spanish. What is best for usability and SEO?
http://www.example.com/sample.html http://www.example.com/fr/sample.html http://www.example.com/es/sample.html
http://www.example.com/sample.html http://fr.example.com/sample.html http://es.example.com/sample.html
http://www.example.com/sample.html http://www.example.com/sample.fr.html http://www.example.com/sample.es.html
Or should I simply parse the
Accept-Language header and generate content server-side to suit that header?
Is there another way to do this? If the different language versions don't have different urls, what do I do about the search engines?
Google has new recommendations for
meta tags for explicitly pointing to other language content: New markup for multilingual content.
Related but not precisely: Multilingual and multinational site annotations in Sitemaps
UPDATE 2013-06-12 Targeting site content to a specific country includes discussion of several URL schemes directly relevant to the question.
In my opinion, you should use either the folder or subdomain approach, because they are more intuitive to the user. Which one is a matter of personal taste, I personally find the folder approach clearer. The filename option is far less intuitive.
Accept-Language header for directing the user to the correct content on his first visit is a good idea, but you should only do it to redirect on the folder or subdomain url. Otherwise, it would be impossible to link to content in a specific language, and the indexing of your website will be a mess.
Answering a question similar to yours on his blog, Matt Cutts suggests:
If you have sites with say French and German versions for a business, my preferences would be:
- ccTLDS such as example.fr or example.de
- After than, subdomains such as fr.example.com or de.example.com.
- If that’s not possible, I’d use subdirectories such as example.com/fr/ or example.com/de/
I would not use subdomains. In terms of SEO it's less helpful: http://www.hobo-web.co.uk/seo-blog/index.php/blog-subdomain-or-subfolder-which-is-best/.
Similar talk here: Subdomain versus subdirectory.
If you look at big sites, the most often use subdomains.
It also depends if your business is more of a global or local nature. We are a copyrighting agency, so for use its more local business. Therefore Top Level Domains are better than running everything on
Filename is a concept I have not seen yet.
This is the same question I asked on Stack Overflow. And I got a resource for it, which I’ll post as an answer here.
I have found a nice resource from Google on the choices you can make. There is a section with pros and cons of each method you can use.
I have been struggling with multi-lingual websites for a while now. There are definitely some points in the article that are not mentioned in the answers mentioned. That why I felt the need to post this as an answer. I hope this helps someone out.
As a German user I hate it when a website won't let me on the English page because it's think it knows better what I want. It might be hard for Americans to understand but there are actually people who speak more than one language.
Sometimes I might want to view the German websites and sometimes I might want to view the English one.
Simply parsing the
Accept-Language header might drive me mad.
That especially true if your German page is a cheap translation of your English page.
To make it easy for your user the English version should also have localisation such as
When I type
domain.com you get one guess to give me the English or the German page based on my
Accept-Language header. If I however don't like your choice than I should be able to simply exchange the language in the domain name.
Extra hint: If you have the language in front of the domain name both typing
de.domain.com should bring me to the German website.
Use subdomain option if you use localized versions (i.e. France != French). Use subdomains, but I think it's better use directories if this country uses diferent languages. For example:
us.domain.com (USA) us.domain.com/en/sample.html (USA - english) us.domain.com/es/ejemplo.html (USA - spanish) es.domain.com (Spain) es.domain.com/es/ejemplo.html (Spain - spanish) es.domain.com/ca/exemple.html (Spain - catalan)
Bing relies on geo-meta tags, but for Google you have to use Google Webmaster Tools.
If you want to target global markets use
www.domain.com with a prefered user language (browser give laguage priorities on
Accept-Language header) when you have it or with your key market language when you don't have it.
There are many acceptable ways to structure your site for both SEO and internationalization. Each have advantages and disadvantages.
Buy the same domain name at multiple top level country domains like
example.com.autargeted at audiences in different countries. The sites may have duplicate content with slight spelling differences and still rank well. In fact, multiple well localized sites in the same language may rank better than a single site in that language.
es, search engines may assume that the site is only appropriate for users from Spain, not for all Spanish speakers.
Buy a single domain, and use sub-domains such as
Buy a single domain, and use sub-directories such as
Advantages and Disadvantages
index_de.html. This technique is not fully supported by Google. For example, there is no way to set targeting in webmaster tools.
lang=en. It is not recommended for the same reason that different file names are not recommended.
Accept-Languageheader and crawl from different geographic locations. However, Google still recommends that you have separate URLs for content in different languages.
Accept-Languageheader to suggest that users might prefer a different version of the site by displaying a message when the site they are visiting does not match the
When supporting multiple languages, you should clearly mark up with language meta-data.
Use the lang attribute in the
Use rel alternate links to the same page in other languages as suggested by Google:
<link rel="alternate" hreflang="es" href="http://www.example.com/" /> <link rel="alternate" hreflang="es-ES" href="http://es-es.example.com/" /> <link rel="alternate" hreflang="es-MX" href="http://es-mx.example.com/" /> <link rel="alternate" hreflang="en" href="http://en.example.com/" />
Alternately, this information can be put into sitemap files.
You should add each language (or locale) of your site to Google Webmaster Tools. This can be done for top level domains, for sub- domains, or for sub-directories.
If your site is targeted by country, you should use webmaster tools to set the site targeting. Navigate to "Configuration" -> "Settings" -> "Geographic target" and choose to target the correct country from the drop down list.