Canonical URL and Localization

In my application, I have localized URLs that look something like this:

This question is mainly for Facebook Likes, but I think that I will have problems with similar problems when I start thinking about search engines.

What URL do you expect as a canonical URL? I donโ€™t want to use English exact English, because I want the people who click the link to be redirected to their own language (browser setting / IP dependent).

Searching by IP address is not what I want to do with every hit on the page. In addition, I will need to include more โ€œstateโ€ in my application, because I have to check whether the user is already redirected to his own locale or specifically designed to view the English version.

I assume it will be something like:

http://example.com/something/animals/elephant

or possibly without any language identifier:

http://example.com/animals/elephant

but itโ€™s a little harder to implement, more likely to collide URLs in the future (in the rare case, I would get a category named en or de).

Summary

What URL do you expect as a canonical URL? Is there already a standard set for this?

+7
url url-design web localization canonical-link
source share
4 answers

I found one resource that recommends not using a canonical tag with localized addresses. However, the Google documentation does not indicate and only mentions subdomains in a different context.

0
source share

Of course, there is no โ€œStandardโ€ that should be a URL. What you certainly see on many advertising sites is exactly what you describe:

<protocol>://<server>/<language>/<more-path> 

For a "language tag", you can also follow RFCs . I assume your 2 letter abbreviation is pretty good.

I just disagree with the <more-path> URL. If I understand you correctly, are you thinking of converting each page to a local language URL? I would not do that. I may not be a standard user, but I personally personally like the monkey in the URLs, that is, if the display URL is http://examle.com/de/tiere/elefant , but I do not believe that the content you need translate, I would manually try http://examle.com/ en /tiere/elefant - and that would not lead me to the expected page. And since I also donโ€™t like these URLs http://ex.com/with-the-whole-title-in-the-url-so-the-page-will-be-keyworded-by-search-engines , my beloved it would be easy to share part of <language> and use common English (or any other language) for <more-path> . For example:

If your site is something like Wikipedia, I agree with your <more-part> translation scheme.

-one
source share

There is more to the language you need to think about.

This is a typical tuple 3 {region, language, property} If you have only one website, you have only {region, language} .

Each piece of content can be either different in this three-dimensional space, or at least presented differently. But this is one and the same piece of content, so you want to centralize the management of editorial signals, promotions, tracking, etc. Think about search engines - you want the page rank to be combined into all copies of the article, and not spread thinly outside.

I think there is a standard solution: Canonical URL

Put the language / region in the domain name

 example.com uk.example.com fr.example.com 

Now you have a choice of how you attach cookies for a subdomain (for language / region) or for a domain (for tracking users)!

On each html page add a link to the canonical URL

 <link rel="canonical" href="http://example.com/awesome-article.html" /> 

Now everything is ready.

-one
source share

Perhaps these Google recommendations may help with your problem: https://support.google.com/webmasters/answer/189077?hl=en

It says that many websites serve users (worldwide) for user-targeted content in a particular region. It is recommended that you use the rel = "alternate" hreflang = "x" attributes to provide the correct language or regional URL in the search results.

-one
source share

All Articles