rel-canonical-html-codeCanonical tags are a hidden message on a web-page which simply say: “I’m just a copy of this other web-page found here…


How Search Engines Deal With Duplicate or Similar Pages

When most search engines come across two or more pages with very similar content they often choose just one of the pages to index, effectively ignoring the others.  Which duplicate page URL they decide to choose could be based on a number of factors including whichever one was first crawled, which one has the most internal links or which one has the most external links.

Duplicate content is not only bad for SEO, it can also harm conversion rates by not showing content in it’s best possible state.


Example of Product Page Duplication

Let’s look at an example of e-commerce product page duplication below:


All these product pages for the same ‘Red Toy Truck’ have exactly the same content with only insignificant variations such as the top breadcrumb links.  The way this website has been structured means that there are three pages for one product, so canonical tags are required to eliminate two of the copies:


Using canonical tags, we have signified to search engines that the original product page is located at [] and that the other two URLs are just mere copies.  In this case it’s wise to choose the permanent product page which isn’t in the “sale” category (the sale is likely to end one day) and which isn’t in the “items under £10” category (the price may rise one day to over £10).


How URL Parameters Can Result in Page Duplication

Page URLs can have added information at the end of them in the form of parameters, these are always shown after a question mark in the URL:

  • Non Parameter URL –
  • Parameter URL resulting in completely different page content –

Sometimes URL parameters show completely different page content, other times they may filter out certain bits of content and other times they have absolutely no effect on a page’s content what-so-ever:

  • Completely different content than in no parameter was used:
  • Slightly different content than if no parameter was used:
  • Insignificant change on the content with or without the parameter:
  • No change at all on the content with or without the parameter:

Search engines can treat URLs with different parameters as different, unique pages. It’s then important to promote the best URLs by using canonical tags if the content isn’t significantly changed when parameters are added.

If you don’t want search engines to index certain patterns of URLs then make sure to use the robots.txt file to block them, this will eliminate tracking parameters from being indexed for example which may mess up overall statistics.


Example of Many URLs for the Same Webpage Content

Web pages can reference themselves with canonical tags

Web pages can safely reference themselves

There are many ways for a website to have multiple URLs for exactly the same web page.  Luckily canonical tags can be used to self-reference a page to eliminate these issues.  For example, a webpage could safely say that it’s a copy of itself and eliminate any confusion with parameters, sub-domains, etc. (see below).

Here are several examples of several URL variations for the exact same page on a website.  It’s well worth checking these all out  on a website and if needed, use canonical tags to reference the preferred URL:

  • (preferred URL)

These issues will be resolved once a visit to all the wrong URLs has a canonical tag linking to the preferred URL ( in this case).

The “www.” or  issue can be resolved with a simple 301 redirect so that every time a URL is entered without the “www.” it will automatically be added in.


URL Parameter Filters

Things can get complicated when URL parameters filter out results on a web-page.  You typically see this in action on e-commerce websites, local listings or other highly filterable results such as on property or holiday websites for example.

In these cases you should ask yourself if directly visiting the parameter URLs enhance or limit the results shown and if search engines will think they are unique enough to index separately.  In most cases you will not want search engines to index a parameter URL which filters as this could be shown in place of a non-parameter URL which shows all filter options and all products/items:


E-commerce website filters can reduce items down to a certain colour, sub-category, price range or review score.  There would be little advantage in showing a limited selection of your products within a certain category rather than all the products at once, unless you have a significant number of products and there are active searches for such niche keywords.

The major search engines such as Google and Bing do a great job of understanding what parameters filter out content and what parameters completely change content.  If you are in any doubt then it’s best not to create canonical tags for filter URLs and let the search engines automatically try and determine your URL structure.


HTML Code for the Rel Canonical Tag

Below is the HTML code for implementing the canonical tag, it should be placed within the <head> section of the code where it has no effect on the page’s content:

With an absolute URL:
<link rel=”canonical” href=”” />

…or with a relative URL:
<link rel=”canonical” href=”/page-url” />


Common Mistakes With Canonical Tags

The misuse of canonical tags can result in dire consequences.  Imagine if every page on a website claimed to be a copy of the homepage; search engines will de-index every page on the website and only show the homepage within search engine results!

Here are some common mistakes we have come across with canonical tags:

  • Having a non-dynamic canonical tag on every page of the website pointing to one URL (an SEO killer!)
  • Having two different canonical tags within the HTML code (only the first one is counted by search engines)
  • Writing the URL down without the “http://” part if using an absolute URL (this forms incorrect URLs)
  • Pointing product pages towards the category pages they reside in (product pages need to be indexed separately)
  • Using canonical tags on paginated URLs (see below for more information)

Paginated URLs are a sequence of URLs which display an order of information.  Examples include stories, list of products, lists of blog/news posts, lists of information, etc.

Let’s say you wrote a great story online which spanned over four chapters on four different web pages.  You could want search engines to only index and send people towards the first page of the story.  To do this you would use a canonical tag to point every chapter page towards the first chapter:


Canonical tags shouldn’t be used for paginated content

This would effectively lose all the content shown in chapter 2 onwards, a huge amount of unique content which some search engine users may wish to jump straight towards or find quickly.  Instead of using canonical tags you can use other “rel” tags called “next” and “prev” which shows the relationship between all pages:


Prev/Next tags should be used for paginated content

Chapter three for example(*) would need to reference chapter two as the previous page and chapter four as the next page using these tags shown below:

<link rel=“next” href=”″ />
<link rel=“prev” href=”″ />

Search engines understand the “next” and “prev” tags and will more likely show the first page of the sequence within any search engine results eliminating the need for canonical tags hiding rich content.



Canonical tags can help improve SEO and conversion rates, but you need to be very careful when implementing them.

Most common CMS and Ecommerce platforms now handle canonical tags automatically or have well built plugins to do so, view the web page’s HTML source code and see if canonical tags are present (hint: use CTRL + F).

If you are unsure how a website is represented in Google then try the site operand and look at which pages have been indexed and you may spot an opportunity, good luck!

13 responses to “How To Use Canonical Tags Properly”

  1. Devendra says:

    Hi, I am working on an eCommerce website, it has thousand of URLs in Google Index with parameters used for filtering products. These pages showing same title and description as parent category page, here are some sample pages-

    Should I add canonical tag to just main category page or to all the parameter pages (there are thousands of them), I don’t even know whether these dynamically generated pages physically exist or not.

    My second doubt – Newly created pages should take canonical tag as they copy other tags but will the already indexed pages be also able to pick canonical tag from the parent category page?


  2. Hi Devendra,

    The canonical tags should be within the source code when you visit the parameter URLs such as

    Depending on the eCommerce platform you should be able to reference the non-parameter version of the category page with a function on the category template pages.

    This needs to be dynamically added to the template so it works for old pages as well as any added new pages. Ensure that these are right before making it live, you could possibly comment out the canonical tag whilst working on it or use a hidden development site.

  3. Paul says:

    You mention that one wrong way to use canconical is Pointing product pages towards the category pages they reside in (product pages need to be indexed separately).

    However, you don’t mention why.

    I have a wordpress & woocommerce site which has products, some of which are very similar in title and description. I really don’t want to condense the products down, because for the user experience it is better to have individual products.
    To avoid indexing of what could be seen as duplicate content by a search engine, i use a canonical url on each product. The canonical points towards the product category page.


    Product category: Airport transfer to city
    Product 1: Airport transfer to city for 1 to 4 people
    Product 2: Airport transfer to city for 5 to 6 people

    etc etc

    This results in google only indexing the product category page, which i feel is a good move.

    Is this wrong in your view? If so, why would this be wrong?

    Additionally, if i am using canonicals on each product to achieve this, do you feel that each product should also be “no index, Follow” ? or should i state “index, follow”?

    Should i include each product in the xml sitemap?

    Thanks for your very helpful article, i hope that you can answer my further questions for clarification on this.


  4. Hi Paul,
    In your example the category pages are by far the best thing to allow search engines to index.
    The product pages you mention seem more like filtered category pages rather than individual product pages and can be hidden from search engines with the robots.txt file explained here:
    You can leave the product pages to “index, follow” and still use canonical tags on the filtered category pages to pass back any SEO value in case someone links directly to those pages. Add them to the XML sitemap also to speed up the crawling process for search engines.
    If you have unique product pages then you may wish to keep them indexed as they will be more keyword focused instead of relying on the generic keyword which is harder to rank highly. For example a good landing pages for you would be “Airport Taxi to [city]”, “Airport Minibus to [city]”, “Private Airport Coach to [city]” etc. etc.
    I hope that helps,
    Best Regards,

  5. Samuel J. Greear says:

    I recently performed a very real-world experiment that measured the effects of changing the canonical url of a set of pages from one domain to another.

    It’s obvious that they are a signal Google listens to quite strongly.

    • Thanks for sharing Samuel, we have also seen some great improvements by getting it correct, there’s nothing worse than showing Google lots of duplicate content I think as it’s in indexing nightmare.

  6. android apps says:


    I have a wordpress blog where i publish articles. I want to show stars in for my blog articles in google SERP.
    I guess one way is to put aggregate schema. How to put that code in each blog post?

    articles are mainly discussing problems and giving solution in the form of mobile app(s).


  7. Rakshith says:

    Hi author, I just want one clarification for my doubt. Suppose i have a url A/product-name. and With H1 tag different and rest of the content as same. Then can i use canonical tag?

    • Jonathan Ellins Jonathan Ellins says:

      Hi Rakshith,
      That would be a good use of the canonical tag, yes. There wouldn’t be much between the two places and the pages would be nearly duplicate content.

  8. Soumyadip Chatterjee says:

    Hi, Jonathan, you have explained everything in detail, I got all your points
    But one thing I have a doubt, In my category pages I have included a short description but when I am going to the second page of the category it’s showing the same description at the top( means in every page of that catgory it’s showing the same description) now will have I have to set the canonical to the first page.

    example i have written the description showing the same description on the top and same for the next pages

    Plz help regarding this

  9. Hi Soumyadip,
    The “next” and “prev” tags are fully setup for each page, I would just remove the top description for pages 2 onwards to make each page unique and attract search engines to the first page for indexing.

    • Soumyadip Chatterjee says:

      But how to remove the top description from second page because once i set the description it will show in all pages
      So, will i have to set the first page url as cononical in yoast
      or, i have to do something else
      Plz suggest

      • Jonathan Ellins Jonathan Ellins says:

        Hi Soumyadip, You will need to modify your WordPress category template to only show the description on the first page. It’s a developer job but Google would be most likely to choose page 1 still.

Leave a Reply

Your email address will not be published. Required fields are marked *