Refactored media has added a feature rich web part to the Kentico marketplace for Kentico version 10 which will make adding canonical links to pages a lot easier.
Features
- Href lang support - multiple languages based upon kentico multi-language configuration (sub-domain, folder bases, query string based)
- URLs are correctly modified based on kentico SEO settings
- Support for wildcard / dynamic urls
- Points back to the original document for linked pages
- Allows control of the querystring behavior
You can enjoy a copy of it by downloading it from here.

Configuration
Settings
- Primary Domain
- (ex. www.domain.com or domain.com) Leave blank to use kentico site settings.
- Protocol
- (http, https) don't include "://". Leave blank to use the pages SSL settings.
- Replace Previous Canonical Tags?
- Replaces the previously generated meta tag created by a different instance of this control. Useful if you want to override the behavior on a certain page.
- Ignore Query String?
- If checked, the webpart will ignore the query string in urls to generate canonical tags.
Main Canonical Tag (rel="canonical")
- Output when page is the main document
- Output the canonical tag when the url to access the document is the main alias path (not an alias or linked document).
- Output when page is an alias
- Output the canonical tag when the url used to access the document is on one of the defined document aliases.
- Output when page is a linked document
- Output the canonical tag when the url used to access the document belongs to a linked document, and not the original document.
Language Alternate Canonicals (rel="alternate")
- Output when page is the main document
- Output the rel href="lang" tag when the url to access the document is the main alias path (not an alias or linked document).
- Output when page is an alias
- Output the rel href="lang" tag when the url used to access the document is on one of the defined document aliases.
- Output when page is a linked document
- Output the rel href="lang" tag when the url used to access the document belongs to a linked document, and not the original document.
Instructions
- In Kentico navigate to Sites > Import site or objects
- Upload the zip file and click Next
- Ensure Import Files and Import Code files are checked, click Next
- The web part will be imported under the webpart category Refactored