Link rel="canonical": Should different user guide versions use the same canonical url? [closed]
Asked Answered
I

1

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">
Incapacious answered 7/10, 2016 at 8:50 Comment(1)
A
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.

Althaalthea answered 7/10, 2016 at 20:31 Comment(4)
Is there any google-approved way to make Google prefer the latestFinal url for search results?Incapacious
@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, is about this case.Althaalthea
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.Gothard
@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.).Althaalthea

© 2022 - 2024 — McMap. All rights reserved.