hreflangs for default and french page
Asked Answered
C

2

1

I am doing the seo for multi-language, i have English,French,Spanish version web pages. so, for English pages, I have example.com/en, and inside the page content with English page as default.

<link rel="alternate" href="http://example.com/sp" hreflang="sp" />
<link rel="alternate" href="http://example.com/fr" hreflang="fr" />
<link rel="alternate" href="http://example.com/en" hreflang="x-default" />

However, in french page, http://example.com/fr, do i have to do this again? such as add the following to fr page?

<link rel="alternate" href="http://example.com/fr" hreflang="fr" />
<link rel="alternate" href="http://example.com/en" hreflang="x-default" />
<link rel="alternate" href="http://example.com/sp" hreflang="sp" />
Camaraderie answered 3/10, 2014 at 19:18 Comment(1)
Your two snippets are identical (apart from the order).Erotic
W
0

Yes, you have to do it for French, but as following:

<link rel="alternate" href="http://example.com/en" hreflang="en" />
<link rel="alternate" href="http://example.com/sp" hreflang="sp" />

It is not a real issue if you leave the fr and x-default links in the French page too, but it is redundant.

For Spanish do as following:

<link rel="alternate" href="http://example.com/fr" hreflang="fr" />
<link rel="alternate" href="http://example.com/en" hreflang="en" />
Westfall answered 4/10, 2014 at 16:7 Comment(0)
E
0

x-default is a private language tag, so it has no meaning outside of any private agreements. You did not mention which meaning you want to use for it, but I’m assuming you intend to use Google’s meaning as described on Use hreflang for language and regional URLs.

According to this documentation, the x-default value is for

[…] indicating language selectors/redirectors which are not specific to one language or region, e.g. your homepage showing a clickable map of the world

So it seems that you should not use it like that.

If, for example, your homepage would serve as language selector, you could use

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

Other parties might have different interpretations.

Erotic answered 3/10, 2014 at 21:40 Comment(0)
W
0

Yes, you have to do it for French, but as following:

<link rel="alternate" href="http://example.com/en" hreflang="en" />
<link rel="alternate" href="http://example.com/sp" hreflang="sp" />

It is not a real issue if you leave the fr and x-default links in the French page too, but it is redundant.

For Spanish do as following:

<link rel="alternate" href="http://example.com/fr" hreflang="fr" />
<link rel="alternate" href="http://example.com/en" hreflang="en" />
Westfall answered 4/10, 2014 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.