TL;DR SEO test
I created two key phrase unique pages and tested if I could get one to rank for the other by using the canonical tag. Google completely ignored it.
Hypothesis: Google will ignore the canonical tag if it believes that two pages are sufficiently different.
Test: Create two brand new pages around two fictional sodas with completely fictional names that produce zero Google results. Use the canonical tag to refer drink brand B page to drink brand A and see if this will make drink brand A rank for drink brand B’s name.
Why do?
The canonical tag has actually been a quite a powerful lever for changing rankings within Google. I’ve seen examples whereby webmasters have accidentally pointed all internal pages to the homepage and dramatically boosted the homepage ranking (I assume consolidating URL signals) and other cases where blackhats have exploited cross-domain canonicals.
It is my assumption that one of the reasons Google is not keen on honouring javascript-injected canonicals (even though they apparently do) is that many sneaky third-party plugins may pull this trick on webmasters. That is, hiding some javascript in their plugin code that’s going to search out similar pages on the webmaster’s site and inject a cross-domain canonical tag.
Is this test anywhere near perfect?
Lol, no.
What I done did
I created two orphan pages of content for Royjeploto soda and its ‘competitor’ Grunkbunkala soda.
The Grunkbunkala page has a canonical tag that refers to itself.
The Royjeploto page has a canonical tag referring to the Grunkbunkala page.
I got a couple of third-party sites to link to each one of these pages to get them indexed and sure enough, they were the only ones ranking for this term.
50 days later.. Confirmation on what we were told
Despite confirming the page had been crawled and through Google’s rendering process, it would appear that Google has successfully determined that the content is not a close enough match. Googling either brand will only show results for that individual page. This seems to confirm what John said, that Google will ignore canonical tags on non-equivalent pages.
Guess I’m never getting that 45 minutes of my life back. 🤷
I don’t believe Google has historically been this careful with canonicals, so it’s arguably vaguely interesting Google has taken these steps to protect its usage.