skip to Main Content

I have multiple translations of each page on my site. Example:

  1. https://www.example.com/something (English – default)
  2. https://www.example.com/en/something (English)
  3. https://www.example.com/es/something (Spanish)

I am trying to figure out the correct hreflang tags for these pages. None of Google’s examples seem to explain how to handle it when you have 2 pages for the language. One is just the canonical.

If I do this, ahrefs tells me I have an error because there are 2 pages for "en":

<link rel="alternate" hreflang="en" href="https://www.example.com/something" />
<link rel="alternate" hreflang="en" href="https://www.example.com/en/something" />
<link rel="alternate" hreflang="es" href="https://www.example.com/es/something" />

Google actually discourages using canonical tags along with hreflang tags. https://developers.google.com/search/blog/2011/12/new-markup-for-multilingual-content

Is the correct solution to simply not have the "/en" version?

2

Answers


  1. You don’t need the /en/something page because you already have the main English domain with hreflang="en". You would have double and identical pages without a utility, even setting canonical tags.
    The important thing is that each language has its correct hreflang.

    Login or Signup to reply.
  2. In this scenario, you can add a self-referencing hreflang tag for the default language version. This helps Google bots to identify which is the default version of the page. You can use the x-default html attribute for the default language page.:

    In the following example, "https://www.example.com/default-page&quot; is the default language page, and there are alternate versions in Spanish and French.

    Example :

    <link rel="alternate" hreflang="en" href="https://www.example.com/default-page">
    
    <link rel="alternate" hreflang="es" href="https://www.example.com/es/page-url">
    
    <link rel="alternate" hreflang="fr" href="https://www.example.com/fr/page-url">
    
    <link rel="alternate" hreflang="x-default" href="https://www.example.com/default-page">
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search