website icon indicating copy to clipboard operation
website copied to clipboard

Add hreflang meta tags to Articles with localizations

Open veganstraightedge opened this issue 5 years ago • 1 comments

https://support.google.com/webmasters/answer/189077

Let's say we have an article with a slug cat in English (en).

It's also translated to Spanish (es) and German (de).

On each article, include a link tag to the other translations:

<link rel="alternate" href="http://example.com/cat" hreflang="en" />
<link rel="alternate" href="http://example.com/gato" hreflang="es" />
<link rel="alternate" href="http://example.com/katze" hreflang="de" />

But not all three. Just the two that aren't of itself.

veganstraightedge avatar Mar 06 '19 07:03 veganstraightedge

We can also use the sitemap.xml to complete this issue. It'd be interesting to check if the actual sitemap.xml is already doing it and if not, if it'd not be easier to setup the sitemap.xml rather then the <link ....> in the header.

just1602 avatar Dec 13 '22 04:12 just1602