3

As I understand correct a canonical URL should point to the original URL of the website. Our website provides different languages that can be switched with an URL parameter, instantly.

Our website is well translated and offers the same content in a different language and once the language parameter is not provided it will determine the language of the browser and show the right language without redirecting to add the language parameter.

There are three ways I could put the canonical URL now and I'm not sure what I should pick:

  1. Always using https://example.org/?Lang=xx-XX with the language parameter that is used or the determined language when no language parameter is set.

  2. Always using https://example.org/, assuming language does not matter as the content is the same in meaning. I guess this is wrong, because a crawler would be English, so it would never crawl other languages, since other languages have the same original URL, it wouldn't?

  3. Using https://example.org/?Lang=xx-XX when the language parameter is provided, otherwise using only https://example.org/, assuming when the language is not provided the original link shouldn't contain the language, too. So it will be determined when following the canonical URL.

Currently, we are going with variant one. This, however, ended up showing us on Google with the language parameter. When the exact text matches this is reasonable. But when I search for our name I rather want to see the URL without language parameter.

What should I do?

  • 1
    Each language is unique content to search engines. You shouldn't claim that a translated page is canonical to the English. – Stephen Ostermiller Nov 23 '16 at 14:04
  • @StephenOstermiller It wouldn't claim that the translated page is canonical to the English version, it would claim that a translated page is canonical to the client's language version. However, I think you are right, so we went for approach 1, but can we still get rid of the language parameter in the Google search results? – Martin Braun Nov 23 '16 at 18:40
  • 1
    I'm trying to say that every language needs a separate canonical URL. It is best for SEO if the language is somehow specified by the URL and not by the client. A URL parameter is not a great choice though. See: How should I structure my URLs for both SEO and localization? – Stephen Ostermiller Nov 23 '16 at 18:44
  • @StephenOstermiller Thank you, this actually helped a lot. – Martin Braun Nov 23 '16 at 18:54
2

What you're looking for is the hreflang tag. These indicate to a crawler that an alternative language version exists. The crawler will then index the page with the language that matches it's own version.

There's three implementations:

  • In the HTML section: <link rel="alternate" href="http://myenglishversion.com" hreflang="en-gb" />
  • In the HTTP header: Link: <http://myspanishsite.com/>; rel="alternate"; hreflang="es"
  • In the Sitemap: <url> <loc>http://www.example.com/de</loc> <xhtml:link rel="alternate" hreflang="en" href="http://www.exmaple.com/en" /> <xhtml:link rel="alternate" hreflang="de" href="http://www.exmaple.com/de" /> </url>

Sitemaps have to be submitted via the Webmaster tools / Search Console for the search engine.

| improve this answer | |
  • Instead of submitting the sitemap to each search engine, you can simply link it from your robots.txt, no? – unor Nov 23 '16 at 16:50
  • You can but it's faster to request a scrape. It also hides the URL if you don't want competitors scraping your site with it (as happens in my industry, looking for customer profiles) – L Martin Nov 23 '16 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.