Link rel=“canonical”: Should different user guide versions use the same canonical url? [closed]

北城余情 提交于 2019-12-22 05:21:47

问题


Should 2 different versions of a user guide use a different canonical URL?

Documentation version 1.1.0.Final:

<link rel="canonical" href="http://docs.foo.org/1.1.0.Final/index.html">

Documentation version 1.2.0.Final:

<link rel="canonical" href="http://docs.foo.org/1.2.0.Final/index.html">

Or should 2 different versions of a user guide use the same canonical URL?

Documentation version 1.1.0.Final:

<link rel="canonical" href="http://docs.foo.org/latestFinal/index.html">

Documentation version 1.2.0.Final:

<link rel="canonical" href="http://docs.foo.org/latestFinal/index.html">

回答1:


Per The Canonical Link Relation from RFC 6596, the canonical link type may only be used for URIs that identify content that is

  • duplicative, or
  • a superset.

As this is not necessarily the case for different versions of the user guide (because features might be added/removed/changed), the canonical link type must not be used to always point to the latest version. If you want to use canonical, it would have to be self-referential.



来源:https://stackoverflow.com/questions/39913212/link-rel-canonical-should-different-user-guide-versions-use-the-same-canonica

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!