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
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)Footnote: I found a handy hreflang generator tool here
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.