Will rel=canonical break site: queries ?

Posted by Justin Grant on Stack Overflow See other posts from Stack Overflow or by Justin Grant
Published on 2010-04-06T21:07:42Z Indexed on 2010/04/06 21:13 UTC
Read the original article Hit count: 350

Our company publishes our software product's documentation using a custom-built content management system using a dynamic URL namespace like this:

http://ourproduct.com/documentation/version/pageid

Where "version" is the version number to which the documentation applies, and "pageid" is a unique string which identifies that page in our back-end content management system. For example, if content (e.g. a page about configuration best practices) is unchanged from version 3.0 and 4.0 of our product, it'd be reachable by two different URLs:

http://ourproduct.com/documentation/3.0/configuration-best-practices
http://ourproduct.com/documentation/4.0/configuration-best-practices

This URL scheme allows us to scope Google search results to see only documentaiton for a particular product version, like this:

configuration site:ourproduct.com/documentation/4.0

But when the user is searching across all versions, we don't want Google to arbitrarily choose one of the URLs to show in results. Instead, we always want the latest version to show up. Hence our planned use of rel=canonical so we can proscriptively tell Google which URL we want to show up if multiple versions are being searched. (Users who do oddball things like searching 2 versions but not all of them are a corner case, so we don't care which version(s) show up in that case-- the primary use-cases we care about is searching one version or searching all versions)

But what will happen to scoped searches if we do this? If my rel=canonical URL points to version 4.0, but my search is scoped to 3.0, will Google return a result?

Even if you don't know the answer offhand, do you know a site which uses rel=canonical to redirect across folders in a URL namespace. If so, I could run a few Google searches and figure out the answer.

© Stack Overflow or respective owner

Related posts about seo

Related posts about google