Have You Used Self Referring Canonical Tag?

The canonical tag is one way of telling search engines that the URL in concern is basically a duplicate of the original page which can be found at this URL. It is a tag which is mentioned within in the <head/> section of the page.

<link rel=”canonical” href=”https://www.examples.com/original-url”/>

What is a self-referring canonical tag?

A canonical tag which points to the very page it resides on is called a self-referring canonical tag. If you have an original page on your site you might want a canonical tag pointing to itself.

In other words, if there are 2 web pages A and B and page B is a duplicate of page A then there must be a canonical tag on page B which points back to page A.

So in this case page B will have a canonical tag as below in it’s <head/> section.

<link rel=”canonical” href=”https://www.example.com/a”/>

While page A which is the original page will have a canonical pointing to itself. This looks like

<link rel=”canonical” href=”https://www.example.com/a”/>

Here is an example of a canonical tag in action on the duplicate page https://www.amandawakeley.com/uk/coats-and-jackets/vilma-suede-bomber-red

Here is an example of a self-referring canonical tag in action on the original page  https://www.amandawakeley.com/uk/vilma-suede-bomber-red

Why Self Referring Canonical tag?

The reason is your site URLs could get tagged with various parameters and session IDs leading to duplicate page URLs.

Suppose you have an original page at https://www.example.com/best-hotels but your email marketing executive has decided to tag the URL https://www.example.com/best-hotels?ref=email then search engines might read this URL as a new one.

Suppose your data analytics team wants to track clicks and purchases through a URL they might tag the URL with something like https://www.example.com/best-hotels?position=navigation&style=dropdown. This will create a new URL and Google might index this duplicate page.

If you are an SEO and want to fight duplicate content and create canonical tags for each of such URLs then it is an endless chase. To overcome this problem one has to use the self-referring canonical tag.

A self-referring canonical tag fights this problem by referring to the original URL in its canonical tag even on a tagged URL.

So a URL like https://www.example.com/best-hotels?ref=email will have a canonical tag pointing to https://www.example.com/best-hotels

In the example of Amanda Wakeley, the canonical tag in the tagged URL points to the original page. https://www.amandawakeley.com/uk/vilma-suede-bomber-red?strings=random

How to implement self-referring canonical tag?

A self-referring canonical tag can be implemented using code. You should code your server in a way writes a canonical tag on any URL after removing all the strings and sessions IDs from the URL.

The exception to this rule should be when you want to overwrite a URL with a new rule or want to manually point a URL to its original source.

Self Referring Canonical and Canonical Tags in action on WordPress

Step 1: Install Yoast SEO plugin. Click on “Add New” under plugins section.

Step 2: Search for Yoast SEO plugin. Click install and activate.

Step 3: Once you do this Yoast automatically employs a self-referring canonical tag.

Step 4: You can change the canonical pointing URL for individual URLs manually by visiting individual post editor. Scroll to the bottom and you will see something like this. Once you enter a URL the original rule gets overwritten.

Keep Learning

Is it OK to use a self-referential canonical URL tag?
5 common mistakes with rel=canonical
Rel=Canonical: The Ultimate Guide by Yoast

After working 7+ years as a digital marketer for startups and large enterprises I quit my job to start EcommerceYogi. Here I share the exact same tactics which I have used to drive millions of users per month to e-commerce stores. Follow me on Linkedin and Twitter to stay connected.