If you need to change you canonical_url for some pages in shopify you can replace  following code in theme.liquid :

Copy to Clipboard

whith this code :

Copy to Clipboard