每个页面的2个版本

问题描述:

我已经使用Jekyll创建了我的博客。我被告知我的网站正在为某些网页编制3个网址的索引,这些网页将被归类为Google的重复内容。我注意到我可以访问:每个页面的2个版本

https://villaagogo.com/guide/universal-orlando-resort/halloween-horror-nights-2017/,https://villaagogo.com/guide/universal-orlando-resort/halloween-horror-nights-2017以及每个斜杠后面的index.html扩展名。

我不知道如何解决这个问题。我在我的配置文件如下:

permalink: /:categories/:title/ 

,并在模板中,我有以下的:

<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}"> 

我需要做什么吗?在博客的主页上也会发生同样的情况,无论是否使用斜线/博客/和/博客

任何帮助都会很棒。

感谢 克里斯

的规范是好的,应该得到遵守,但你也应该重定向一个到另一个与301重定向。

看起来你是好去,虽然:

curl -I "https://villaagogo.com/guide/universal-orlando-resort/halloween-horror-nights-2017" 
    HTTP/1.1 301 Moved Permanently 
    Content-Length: 206 
    Content-Type: text/html; charset=UTF-8 
    Location: https://villaagogo.com/guide/universal-orlando-resort/halloween-horror-nights-2017/ 
    Server: Microsoft-IIS/7.5 
    X-Powered-By: ASP.NET 
    Date: Mon, 28 Aug 2017 23:41:18 GMT