.HTACCESS example that will help avoiding duplicate-content problems in Google, and fixing type-in URLs, typos in inbound links, and badly-coded inbound links.
URL canonicalization, duplicate-content problems in Google article.
This article has been dedicated to URL canonicalization, mainly centered around avoiding duplicate-content problems in Google, and fixing type-in URLs, typos in inbound links, and badly-coded inbound links.
To be clear, a "canonical" domain is the single domain you want your site to be known by, and a canonical URL is the single URL you want your page to be known by. Any others are non-canonical.
The word canonical is a religion-related term, and means "according to canon law, scripture or doctrine." But in general use, it just means "usual, standard, conventional, customary, or according to the rules." So as a Webmaster, you choose what single domain you want to use for your site, and what single URL should be used to request each of your pages.