skip to Main Content

So I use href lang ONLY on my INDEX page, like this:

<link rel="alternate" href="https://example.com" hreflang="x-default" />

But I keep getting these errors in google webmaster tools

Google has detected that some pages on your site have implemented the
rel-alternate-hreflang tag incorrectly. In particular, there seems to
be a problem with incorrect language and region codes, or incorrect
bi-directional linking (if page A links with hreflang to page B, there
must be a link back from B to A as well). Google uses the hreflang
attributes to serve the correct language or regional URL to the right
users in search results. Until you correct the errors on the hreflang
links, your website will not benefit from additional language or
region targeting.

I don’t understand why? I searched alot and can’t seem to find an answer.

2

Answers


  1. If you don’t have any pages with locales listed, then just use x instead of x-default (or indeed the language-code, e.g. en/de etc.)

    Usually you would use hreflang=x-default in a a set like this (note the several locales indicated in the alternate pages)

    <link rel="alternate" hreflang="x-default" href="http://www.example.com/" />
    <link rel="alternate" hreflang="en-gb" href="http://en-gb.example.com/page.html" />
    <link rel="alternate" hreflang="en-us" href="http://en-us.example.com/page.html" />
    <link rel="alternate" hreflang="en" href="http://en.example.com/page.html" />
    <link rel="alternate" hreflang="de" href="http://de.example.com/seite.html"/>
    

    Footnote: I found a handy hreflang generator tool here

    Login or Signup to reply.
  2. Hreflang is used when you have content in multiple languages. From your question it looks like you don’t really have versions of that page in other languages. So don’t use hreflang. Remove that <link> tag.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search