2016-03-04 96 views
2

我有一个网站www.example.com和m.example.com中的相对移动版本,现在我在amp.example.com中有AMP版本。网站的桌面版,移动版和AMP版本

从www.example.com我已经重定向到m.example.it用于移动设备和我使用AMP页:

<link rel="amphtml" … 

从m.example.com我只有规范的标签,以桌面版。

从amp.example.com我只有规范标签到桌面版本。

没关系? 我需要链接m.example.com的AMP版本吗?

3周后,Google Search Console找到了AMP页面,AMP页面位于Google缓存中,但我从未在搜索结果中看到我的AMP页面(我在Google新闻中),而且我也没有统计交通。

您认为所有配置都正确吗?

回答

1

你需要在移动和桌面网页<link rel="amphtml" href="#amp page url#">(“关于任何非AMP页,引用页的AMP版” - 源)。

无关的AMP但necessary for proper indexing of separate mobile content in Google,从桌面上的网页,你需要<link rel="alternate" href="m.example.com/mobile-version/"> - 所以有一个双向rel="canonical"rel="alternate"内容的移动和桌面版本之间。

您还应该提供一个Vary: User-Agent HTTP标头(尽管有报告称这会导致CDN问题,如果适用,您应该查看这些问题)。

1

实际上它并没有说“任何非AMP页”,但

而且约翰·米勒解释它多一点,“我们到非AMP页,反之亦然添加有关AMP页面信息”这里: https://productforums.google.com/forum/#!topic/webmasters/fFQJC2m0OHs

https://www.example.com/desktop/page.html (this is the desktop version of the page) has: 
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/mobile/page.html"> 
<link rel="amphtml" href="https://a.example.com/amp/page.html"> 
<link rel="canonical" href="https://www.example.com/desktop/page.html"> 

https://m.example.com/mobile/page.html (this is the smartphone version of the page) has: 
<link rel="canonical" href="https://www.example.com/desktop/page.html"> 

https://a.example.com/amp/page.html (this is the AMP version of the page) has: 
<link rel="canonical" href="https://www.example.com/desktop/page.html">