The first thing to do when using the canonical tag is to decide which is the preferred URL, and then add the following mark up to the section of the preferred URL and all its variants