【发布时间】:2017-08-28 15:12:45
【问题描述】:
我使用 Jekyll 创建了我的博客。有人告诉我,我的网站正在为某些页面编制 3 个 URL 的索引,这将被归类为 Google 的重复内容。我注意到我可以访问:
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 }}">
我还需要做其他事情吗?同样的情况也出现在博客的主页上,有或没有斜杠 /blog/ 和 /blog
任何帮助都会很棒。
谢谢 克里斯
【问题讨论】: