Liquid Template Variables - canonical url

From Spiffy Stores Knowledge Base

It is recommended that you include the following tag in the head section of your theme.liquid file in order to indicate to search engines that your content may be available under a number of different domain names, and should not be considered duplicate content.

Your site may be penalized by a search engine if it decides that your content is a copy of the content found on another domain name. The canonical link can inform the search engine that the content is to be treated as unique, even though it can be referenced using a number of different domain names.

<link rel="canonical" href="{{ canonical_url }}" />

Further Reference