Given the situation that

docs.foo.com/2.9 is the documentation for a product, revision 2.9 and
docs.foo.com/3.0 is the documentation for a product, revision 3.0

Then you might want another URL

docs.foo.com/latest that redirects to docs.foo.com/3.0, until revision 3.1 launches. When the newer version becomes available, it should then lead to docs.foo.com/3.1.

Should docs.foo.com/latest be a 301 redirect with Cache-Control no-store, no-cache, must-revalidate?

Search engines are supposed to index docs.foo.com/2.9, .../3.0 etc., and it would be nice if they recognized .../latest as the most relevant one and therefore favor .../3.0 over .../2.9, and later .../3.1 over the former two.

Does docs.foo.com/latest require additional configuration? Like, should it be disallowed to be indexed directly per robots.txt, or is there a special header that can be set to indicate that this is redirect that refers to the latest version of some content?

There is also the problem that currently docs.foo.com is equivalent to docs.foo.com/2.9, but docs.foo.com then changed and became equivalent to docs.foo.com/3.0. The 3.0 version has a different structure of its sub pages, so that 404 errors error.

Can docs.foo.com be made equivalent to docs.foo.com/latest, so that it also redirects to the latest version, e.g. docs.foo.com/3.1 and search engines be forced to update their indexes to prevent 404 errors if you follow obsolete docs.foo.com links (which were meant to refer to 2.9)?


If you 301 redirect an URL then the search engine will merge the records on it's end. Your /latest is filed under /3.0, which is what it will index. This not only prevents /latest being a static resource request but prevents it from even appearing in search.

According to best practices, duplicate content must be canonically linked. This means your latest version page has to canonically link to the /latest URI. You'll have to add a rel=canonical ->/latest to the newest version page. Then remove it and place it in the next version when you upgrade. This means /3.0 won't be indexed until it's superseded because the search engine has merged records into /latest. When /latest is drawing from /3.1, it will have to re-index /3.0.

  • Regarding the canonical link: I assume every page of the currently latest version of the content should link to its /latest counterpart? Or is it enough to link to the base address docs.foo.com/latest/?
    – CodeManX
    Jun 14 '16 at 11:30
  • Every page has to have it's mirror in a canonical link.
    – L Martin
    Jun 14 '16 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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