3

The open-source Sinon project has some docs that are versioned per-release. That means that when searching for sinon documentation, you might end up at a doc for version 2.4.1, instead of the latest version (whatever that might be).

What would be a good strategy for ensuring that the highest ranked results in Google would always be the current version?

I was thinking of creating a "version" called current (meaning a path for docs starting with /releases/current/) that would either redirect to the latest version, say /releases/v3.0.1/my-sub-doc.html, or be a copy of the latest docs. I would guess doing a HTTP 302 redirect to a new resource every x weeks might hurt SEO, so maybe the last approach would be the better of the two?

  • 1
    The canonical approach would mean that the older docs wouldn't be findable though. Maybe that's fine, but maybe you have people searching for [yourthing v2.1.2 release notes]. Using the "current" approach would allow you to both keep the old & highlight the current versions. – John Mueller Sep 5 '17 at 7:38
  • 1
    Maybe this question can be answered with this approach: webmasters.stackexchange.com/a/99942/53376 – Seb Sep 7 '17 at 18:00
  • @Seb, that was perfect! – oligofren Sep 8 '17 at 6:12
  • 2
  • I think the most effective approach is doing what Django does. Django uses rel=canonical to obliterate all the older versions of the documentation from the search hits, as well as the alert. See the source of docs.djangoproject.com/en/dev/misc. Most people will want the latest version of the docs, but you still have access to the older versions from the site tools. – oligofren Sep 12 '17 at 15:53
2
  1. Good Way

Links to your newer version documents from as many location you can. The higher links means the higher position it will get. So you can point to your newer version docs from old docs pages, like this is outdated page, please refer new version. You can also point from sidebar/homepage/other-important pages which also have good amount of incoming links.

  1. Bad Way

If those old pages are not important for search users, means it does not solve user query, then you can use canonical link tag. So If your old docs contain canonical link tag which point to newer version of docs , then those old docs will disappear from search results. It meas google will de-index your old docs but still user can access it. So this is better option than redirection.

  1. Ugly way

You can use rel prev or next markup as well, which mostly give high priority (It's purely based on the search results I seen personally on Google) to first webpage. Actually it is mostly used for pagination only, but you can use for your docs version as well. The plus point of this way is, Google can still index and show your old docs on the search results.

| improve this answer | |
  • Usually all the users are only concerned with getting the latest version anyway, and we really don't control the in-links in any way, and have very few inter-site links, so the canonical link approach would probably be the best match. – oligofren Sep 5 '17 at 7:02
  • Can I use canonical link to current, along with a 302 redirect from current to the versioned doc? – oligofren Sep 5 '17 at 7:05
  • Canonical link tag de-index your old docs from search results, so make sure you import every minor things to new docs. Sometimes I seen old docs can solve problem but newer version of docs does not contain such a information, so if you want to use canonical link tag make sure your newer docs contain all useful information. If you implement 302 redirection along with canonical link tag, then there is two possibility happen. – Goyllo Sep 5 '17 at 7:19
  • 1. Googlebot see your 302 redirection(Which says index my old docs as it is, because it is temporary redirection), but when Google see canonical link tag then it will de-index your old docs and index the newer version of docs, so you're doing mistake here by keeping both 302 and canonical link tag. 2. If Google see your old docs return 302 from a long time then it will assume that redirection as 301(permanent), so on that case Google will not going to see your canonical link tag. – Goyllo Sep 5 '17 at 7:20
  • See the comment from john mueller With redirects, the main question is which URL is canonical in the end, and that's the one that gets the signals(Meaning pagerank means higher ranking). If we make the target URL canonical, then it will have the signals, even if it's a 302 redirect there. So a 302 doesn't break the flow of PageRank, it's still either with the source or the target URL, like with any other kind of redirect. – Goyllo Sep 5 '17 at 7:28
1

Your approach of having the "current" documents in the same place all the time should work fine, as long as you make them the easiest to find on your website. Then:

  • They will be the most prominent docs on your website to Googlebot
  • They will be the most prominent docs on your website to users
  • Most links will be created towards the "current" documents
  • Google will prefer the "current" version most often

I've seen Google's John Mueller recommend your "current" approach for "events" websites. For an event website, you would put the pages for this year's event on the main page and move previous years' pages to archive URLs.


Another approach to consider would be using canonical tags. You could mark the latest version of the documentation as canonical. Every time you release a new version you would change all the canonical tags in every version of the documentation to point to the latest version.

When using canonical tags, Google will only index one copy of your documentation. Users will always find the most recent version. If they try searching for an older version, they may not be able to find it.


Comparing the two approaches, the canonical tags are quicker. You could have the latest version in the search results in a just a few weeks. Your current documentation might take some time to get ranked well. You could hurry the process up by changing all the URLs for all old versions. Redirect all old versions to the current version and create new archive URLs for the old documentation versions.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.