1

On www.ubuntu.com we recently started including rel="canonical" tags on every page by default, following Google's recommendation.

However, as you can see on e.g. https://www.ubuntu.com/cloud, the server-side application has incorrectly generated the links with http:// rather than https://:

<link rel="canonical" href="http://www.ubuntu.com/cloud">

This means that if Google follows that reference, they will encounter a 301 back to the current page.

While it's obvious that ideally this should be fixed to correctly reference https://, I feel that this approach of automatically generating self-referential rel="canonical" links will inevitably be error-prone - e.g., we might generate the links with a trailing slash, but actually on the actual site we have a redirect to remove the slash, etc.

So my question is, does anyone know if there's any SEO cost to pointing rel="canonical" to a slightly incorrect URL, but where that URL faithfully 301s (or maybe 302s) to the correct URL?

  • I would see how fast I could correct the error first. I always say fix the problem and not the symptom. Second, I would say use a 301 for as long as you need to to straighten out the problem. – closetnoc Jul 3 '18 at 18:10
1

When you put site:https://www.ubuntu.com/cloud in Google then http version is presented. This can be proof that for now in your particular case Google is not ignoring the canonical and still displays http version in SERPs (even if canonical URL returns HTTP status 301 instead of 200).

Additional notes: John Mueller from Google said that Google can ignore the canonical tag if it's configured in wrong way (for example if all canonical tags points to homepage), but this seems to not be the case in your example. Source

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.