Canonical URL use to SEO ranking for pages which available through multiple URL structure. Specially in CMS ( Content Management System ) like wordpress, joomla, drupla and any ecommerce system where there is lot of possibility to have multiple URL for same content.

“Canonicalization is the process of picking the best URL when there are several choices, and it usually refers to home pages” – Matt Cutts

Let’s consider example of my blog webmull:

www.webmull.com
webmull.com
www.webmull.com/index.php
http://www.webmull.com
https://www.webmull.com

This all URL lead us on same page which home page of webmull but Its all consider as separate URLs. By setting up canonical URL we ask google to use our preferable URL or canonical URL to set index when same content available using different URL.

How to setup Canonical URL:

Let assume I want to set http://www.webmull.com as my preferable URL then We have to write below code intotag.

There is miss concept that 301 redirects is like canonical URL.

Canonical example of with www or without www:

http://www.webmull.com
http://webmull.com

In this example webmull server offer same blogs content with or without www.

Canonical example of HTTP or HTTPS:

http://www.webmull.com
https://www.webmull.com

In this example webmull server offer same content with HTTP and with HTTPS.

Canonical example of with or without trailing slash.

http://webmull.com
http://webmull.com/

There are many more general example which come in picture when we discuss about canonical URL like., website default page or landing page with file name or without file name, Website dynamic URL or SEO friendly URL.