Canonical URL is an HTML code element that defines which URL the search engine should crawl. Canonical URL has a canonical tag: rel=”canonical”.
This type of URL matters since some pages have numerous URLs: AMP versions, desktop/mobile versions, with https:// or without, etc. Search engines may be confused by numerous URLs leading to the same page and, consequently, content. It may go as far as to mark it plagiarism and rank the page way lower.
A canonical tag is also used for clearer URLs. When users see a URL with lots of numbers and letters in random order, they might find the page suspicious and leave it. If you put a clean URL with human words, you are not likely to run into that problem.
You can also use other ways to indicate the best URL:
- user redirect (the most preferred option)
- set passive parameters in Google Search Console (then google will pretend like that URL does not exist for the engine)
- use location hashes
The last two are less popular among SEO experts.