rel="alternate" hreflang="x"

by Aynord
7 replies
Guys need your help with website language versions. The situation is the following:

sitename.com - English version
sitename.com/ru - Russian version

So, what is the correct code should I add to each page?

For English version - <link rel="alternate" href="https://www.sitename.com/" hreflang="en" />

For Russion version - <link rel="alternate" href="http://www.sitename.com/ru/" hreflang="ru" />

And that is it? I don't properly understand google instructions about "each version should have a link to itself and to all other language versions"
#hreflangx #relalternate
  • Profile picture of the author HJdev
    you should place both tags on both pages.
    {{ DiscussionBoard.errors[9894906].message }}
  • Profile picture of the author Darrenshome
    Place <link rel="alternate" href="https://www.sitename.com/" hreflang="en" /> in the <head> section of your English page.

    Place <link rel="alternate" href="http://www.sitename.com/ru/" hreflang="ru" /> in the <head> section of your Russian page.

    Warning: If you post both in ONE page, the last one will only be read by the browser
    {{ DiscussionBoard.errors[9900899].message }}
  • Profile picture of the author Aynord
    yeah, that's where I'm confused. I can't find the correct example for my website.
    {{ DiscussionBoard.errors[9902830].message }}
    • Profile picture of the author HJdev
      "If you have multiple language versions of a URL, each language page must identify all language versions, including itself. For example, if your site provides content in French, English, and Spanish, the Spanish version must include a rel="alternate" hreflang="x" link for itself in addition to links to the French and English versions. Similarly, the English and French versions must each include the same references to the French, English, and Spanish versions"

      you should place both tags on both pages.
      {{ DiscussionBoard.errors[9902927].message }}
  • Profile picture of the author Aynord
    Ok, thanks. So I place below tags for all pages that have different language versions.

    <link rel="alternate" href="https://www.sitename.com/" hreflang="en" />
    <link rel="alternate" href="http://www.sitename.com/ru/" hreflang="ru" />

    Another one question. Do I need to use hreflang="x-default" tag in my case? I don't have the default page, I have only English and Russian versions.
    {{ DiscussionBoard.errors[9903008].message }}
  • Profile picture of the author HJdev
    Yes.

    If you don't have a default page don't place the default tag, its optional.
    {{ DiscussionBoard.errors[9903017].message }}

Trending Topics