Google网站管理员工具向我们提供以下建议:
我们已经注意到,在您站点上的许多页面上,rel-备用-hreflang实现是不正确的。特别是,似乎有一个问题,丢失或不正确的双向链接(当页A链接与hreflang到页B,必须有一个链接从B到A以及)。当我们的算法检测到这些页面上的冲突信号时,它们可能会做出与您所期望的不匹配的索引和排序决策。
他们特别提到的联系是:
http://www.kogan.com/au/careers/
您可以在http://www.kogan.com/au/sitemap-pages.xml上看到该特定URL的站点地图
特别是:
<url>
<loc>http://www.kogan.com/au/careers/</loc>
<changefreq>daily</changefreq>
<priority>0.5</priority>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/careers/"/>
</url>或网址http://www.kogan.com/au/shop/collection/mac-mini/,其站点地图可在http://www.kogan.com/au/sitemap-collections.xml上找到。
特别是:
<url>
<loc>http://www.kogan.com/au/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/au/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/uk/shop/collection/mac-mini/"/>
</url>
<url>
<loc>https://m.kogan.com/#!/au/shop/collection/mac-mini/</loc>
<xhtml:link rel="canonical" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" href="https://m.kogan.com/au/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
<xhtml:link rel="alternate" hreflang="en-AU" href="https://m.kogan.com/#!/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="https://m.kogan.com/#!/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="https://m.kogan.com/#!/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="https://m.kogan.com/#!/uk/shop/collection/mac-mini/"/>
<mobile:mobile/>
</url>我不太确定,根据对规范的解读,我哪里出了问题。是因为移动URL没有链接到桌面URL吗?或者是因为URL被链接到hreflang="en-AU"的同一个URL?
我知道Google网站管理员工具不正确的rel-备用-hreflang实现警告消息有一个类似的问题,它暗示这是谷歌方面的一个bug,不过我很想得到一些确认,或者知道我的实现是否有明显的错误。
发布于 2014-03-03 05:34:27
很少有网站能做到这一点,复杂的排列是非常混乱的。
在这里,你可能有两个不同的问题:
第一个例子(职业):
使用rel=alternate引用,当只有一个URL时,您正在指示该URL还有其他版本。你只需要自我引用,当有其他候补。此循环引用可能导致“双向”(A->B,B->A)错误。
您给出的示例代码的更正如下:
<url>
<loc>http://www.kogan.com/au/careers/</loc>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>第二个例子(收藏品):
错误1:您为每个URL提供了两个移动版本的备用URL (hashbang和版本),然后提供这些移动URL的替代语言版本。
错误2:您在桌面XML的<loc>元素中引用移动URLs -这是不需要的,因为rel=alternate media=会处理这个问题。您只需要在移动XML站点地图中提供移动URL。
错误3:您在桌面XML站点地图中使用<mobile:mobile>标记,这应该仅限于功能电话或智能手机XML站点地图。这将是值得重新阅读详细的规范(在上面的链接)。
错误4:最大的问题是,您没有将<loc></loc>中的其他版本引用为它们自己的实体-- 按照规范,以及关于“双向”注释的警告。
您应该考虑将移动替代URL标记限制在文档的<head></head>上。请记住,rel=canonical到桌面URL 是必需的将包含在您的移动页面的头上
第二个示例代码的更正如下:
<url>
<loc>http://www.kogan.com/au/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>http://www.kogan.com/ii/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>http://www.kogan.com/nz/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>http://www.kogan.com/uk/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/uk/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>在这种情况下,您还需要非常小心地使用rel=canonical (参见本文的答案:https://plus.google.com/+RichardHearne/posts/SpSnNfv3f1a)
https://webmasters.stackexchange.com/questions/58877
复制相似问题