What is meant by canonical URL?
A canonical URL is the URL of the best representative page from a group of duplicate pages, according to Google. For example, if you have two URLs for the same page (such as example.com? dress=1234 and example.com/dresses/1234 ), Google chooses one as canonical.
When would you use a canonical URL?
A canonical URL is used when all versions of the page should be accessible to visitors but only one of them should be indexed by search engines. A 301 redirect forwards both visitors and search engines from one URL to another URL. A redirected URL is not accessible for visitors or search engines.
Do I need canonical URL?
SEO is important for every website, and using canonical URLs can help to better inform search engines which URLs have identical or highly similar content. Understanding how to use canonical URLs is one of many essential front-end developer skills you'll need to optimize your client's website.