On 谷歌的hreflang文档 https://support.google.com/webmasters/answer/189077?hl=en,在两种语言的示例中,它表示:
假设您有一个英语页面托管在http://www.example.com/ http://www.example.com/,还有西班牙语替代方案http://es.example.com/ http://es.example.com/。您可以向 Google 表明西班牙语
URL 是其中之一中英文页面的西班牙语等效内容
三种方式:
-
标头中的 HTML 链接元素。在 HTML 中<head>
的部分http://www.example.com/ http://www.example.com/, add a link
指向西班牙语的元素
该网页的版本位于http://es.example.com/ http://es.example.com/, 像这样:
<link rel="alternate" hreflang="es" href="http://es.example.com/" />
但在其 3 种语言的示例中,它说:
如果您有多个语言版本的 URL,则每个语言页面
必须识别所有语言版本,包括它自己。为了
例如,如果您的网站提供法语、英语和
西班牙语,西班牙语版本必须包含 rel="alternate"
hreflang="x" 本身的链接以及法语和
英文版本。同样,英语和法语版本必须各自
包括对法语、英语和西班牙语的相同引用
版本。
以上是 3 种语言网站的示例。我的网站仅包含 2 种语言 - 默认/主要英语和泰语。我必须添加标签吗对于页面本身? Google 的文档并不清楚这一点,并且在其 2 语言网站的示例中也没有提及。
例如,这是我放入的http://janwawa.com/en/contact.php http://janwawa.com/en/contact.php
<!-- GOOGLE INTERNATIONAL LANGUAGE TARGETING -->
<link rel="alternate" hreflang="th" href="http://janwawa.com/th/contact.php">
<link rel="alternate" hreflang="x-default" href="http://janwawa.com/en/contact.php">
</head>
以上是否正确?或者我应该使用:
<!-- GOOGLE INTERNATIONAL LANGUAGE TARGETING -->
<link rel="alternate" hreflang="en" href="http://janwawa.com/en/contact.php">
<link rel="alternate" hreflang="th" href="http://janwawa.com/th/contact.php">
<link rel="alternate" hreflang="x-default" href="http://janwawa.com/en/contact.php">
</head>
如果您的目的是向他们展示中文用户的英文页面,您确实可以使用第二个示例:
<!-- GOOGLE INTERNATIONAL LANGUAGE TARGETING -->
<link rel="alternate" hreflang="en" href="http://janwawa.com/en/contact.php">
<link rel="alternate" hreflang="th" href="http://janwawa.com/th/contact.php">
<link rel="alternate" hreflang="x-default" href="http://janwawa.com/en/contact.php">
新的 x-default hreflang 属性值向 Google 算法发出信号,表明该页面不针对任何特定语言或区域设置,并且在没有其他页面更适合时是默认页面 -Google http://googlewebmastercentral.blogspot.sg/2013/04/x-default-hreflang-for-international-pages.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)