Difference between revisions of "Liquid Template Variables - canonical url"

From Spiffy Stores Knowledge Base

m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
It is recommended that you include the following tag in the '''head''' section of your [[Theme.liquid|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.
 
It is recommended that you include the following tag in the '''head''' section of your [[Theme.liquid|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.
  
 
<pre>
 
<pre>
 +
<head>
 +
...
 
<link rel="canonical" href="{{ canonical_url }}" />
 
<link rel="canonical" href="{{ canonical_url }}" />
 +
...
 +
</head>
 
</pre>
 
</pre>
 +
 +
== Further Reference ==
 +
 +
* [[Liquid Basics]]
 +
* [[Liquid Tag Reference]]
 +
* [[Liquid Filter Reference]]
 +
* [[Liquid Variable Reference]]
 +
* [[Liquid Paginate Tag|Pagination ]]

Latest revision as of 12:18, 25 June 2018

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.

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

Further Reference