【问题标题】:2 versions of each page每页2个版本
【发布时间】: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

任何帮助都会很棒。

谢谢 克里斯

【问题讨论】:

    标签: seo jekyll hosting liquid


    【解决方案1】:

    规范很好,应该遵守,但您也应该使用 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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-02
      • 2017-12-17
      • 2016-11-23
      • 1970-01-01
      • 2013-05-11
      • 2013-06-21
      • 1970-01-01
      相关资源
      最近更新 更多