For most of the readers here, this is very old news but I loved how John Mueller broke it down in such a simple and clear way. This is how Google picks the canonical URL, the URL it shows in its search results, to searchers. In short, it is mostly about being consistent, it goes back to John Mueller's number one piece of SEO advice, be consistent.
But as you see in the screenshot above, Google says it tries to pick the canonical URL to show in search that is the preference of the site and the preference of the user accessing the site.
Site preference signals:
- Link rep canonical annotations
- Redirects
- Internal linking
- URL in the sitemap file
- HTTPS preference
- Nicer looking URLs
Site owners should use those preferences above consistently and make sure you are giving Google one URL. Be consistent!
If Google picks a different URL, it is just a display thing. It doesn’t hurt your rankings, Google said. It is just a display thing.
Here is the video embed:
Forum discussion at Twitter.