9

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">
Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • 2
    Related question on [webmasters.se]: [*How to correctly mark up different versions of the same document which are non-canonical*](http://webmasters.stackexchange.com/q/99867/17633) – unor Oct 07 '16 at 20:33

1 Answers1

3

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.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • 1
    Is there any google-approved way to make Google prefer the latestFinal url for search results? – Geoffrey De Smet Oct 10 '16 at 07:35
  • 2
    @GeoffreyDeSmet: Not that I know of. For example, a signal like the publication date might help (if Google is sophisticated enough), but this would be a SEO subject (which is off-topic on Stack Overflow). The Webmasters SE question I linked in the comment, [*How to correctly mark up different versions of the same document which are non-canonical*](http://webmasters.stackexchange.com/q/99867/17633), is about this case. – unor Oct 10 '16 at 10:03
  • 1
    Disagree with this. It is used for _essentially_ duplicated documentation, not an exact duplication. The diff between each version is usually miniscule. You'll also be penalised for the duplicated content. – oligofren Sep 05 '17 at 06:02
  • 2
    @oligofren: The RFC doesn’t speak of "essentially" duplicated. *Duplicative* doesn’t have to mean byte-for-byte identical, of course (content might be rearranged, typos be fixed etc.). The idea is that you may ignore the current page if it points to a different canonical URL -- but in OP’s case a consumer (tools, bots, humans, …) should *not* ignore the page, as it may document a feature that is e.g. no longer part of newer pages (or changed etc.). – unor Sep 05 '17 at 12:41