PDA

View Full Version : how to use canonical url?



ronaldotson45
12-14-2012, 12:52 AM
I did little research on the net for canonical URL, i found that when when two different pages in the same website having almost same content then canonical urls being used but how to used?

Brianjohnson
12-14-2012, 04:33 PM
Building a prosperous on-line presence could be time consuming and competitive. Very optimized internet sites tend to attain a greater volume of visitors and consequently a lot more interest and small business.

seoxoom
12-15-2012, 12:21 AM
Use this tag in head section of a webpage Ex: page 1

<link rel="canonical" href="http://www.your-domain.com/page-2"/>

saira
12-15-2012, 03:00 AM
Canonical tag is basically used to tell Google to avoid duplicate page and about the version of url you are targeting. The syntax for the same is very easy, use the below syntax on the targeted page under header section.

<link rel="canonical" href="http://www.your-domain.com/" />

Wedding Photography (http://sarahmacdonnell.co.uk/)

saira
12-15-2012, 03:03 AM
Canonical tag is basically used to tell Google to avoid duplicate page and about the version of url you are targeting. The syntax for the same is very easy, use the below syntax on the targeted page under header section.

<link rel="canonical" href="http://www.your-domain.com/" />

Wedding Photography (http://sarahmacdonnell.co.uk/)

jaysh4922
12-15-2012, 04:28 AM
If you want your canonical link to be the url that contains the collection name, and assuming each product is only in a single collection, then the following code should work



{% if template == 'product' %}
{% if product.collections %}
<link rel="canonical" href="{{ shop.url }}{{product.collections.first.url}}{{ product.url }}" />
{% endif %}
{% endif %}

DavisJoseph
12-15-2012, 05:56 AM
You have to use Canonical tag for less important page to refference your original or important webapage.