问题
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" />
回答1:
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" />
回答2:
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.
来源:https://stackoverflow.com/questions/26185366/hreflangs-for-default-and-french-page