One SEO professional asked John Mueller during a hangout about canonical URLs.
Their question was: They have set canonical URLs on five pages. However, Google is showing a third page also.
Why is it not only showing the URLs where the SEO professional has set a canonical on it for?
John explained that the rel=canonical is a way for you to specify which of the pages within a set of duplicate pages you want to have indexed – which address you want to have used.
In particular, if you have one page, perhaps with the file name in uppercase, and one page with the file name in lower case, then in some situations, your server might show exactly the same content.
Technically speaking, they are different addresses – upper and lower case are slightly different.
From a practical point of view, your server is showing exactly the same thing.
And Google, when it looks at that, says, “Well, it’s not worthwhile to index two addresses with the same content. Instead, I’ll pick one of these addresses and use it to index that piece of content.”
With the rel=canonical, you give Google a signal and tell it – “Hey, Google, I really want you to use the lowercase version of the address when you’re indexing this content. You may have seen the uppercase version, but I really want you to use the lowercase version.”
That’s essentially what a rel=canonical does. It’s not a guarantee that Google will use the version that’s specified there. But it’s a signal for Google to help figure out that, all things being equal, the SEO professional really prefers that address.
This happens at approximately the 17:12 mark in the video.