hreflangs for default and french page

て烟熏妆下的殇ゞ 提交于 2020-01-06 02:19:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!