31

I have 3 URLS that serve the same data:

  • www.example.com/product/foo
  • www.example.com/product/foo?id=1
  • www.example.com?product=foo

For Google's sake I want the URL www.example.com/product/foo to be the canonical one.

However, I have my code setup so all 3 of those pages are served from the same code so if I add in <link rel='canonical' href='http://www.example.com/product/foo' /> to my code it will be applied to all 3 pages, including the one http://www.example.com/product/foo.

Is there any issue with doing this or does having a circular canonical not cause any issues?

2 Answers 2

31

There's no circularity implied by having <link rel='canonical' href='http://www.example.com/product/foo' /> appear as http://www.example.com/product/foo.

That's the intent. You're saying "the best URL" for this page is http://www.example.com/product/foo, so when the search engines hit http://www.example.com/product/foo?id=1, or http://www.example.com?product=foo, it will get that code and say "Aha! This is really that canonical page, I'll make that one official." On the page itself, it just means "Yes, this is a page, and this is the best URL for this page."

1
  • where i can add my canonical tag
    – Gem
    Commented Jul 15, 2017 at 15:58
1

This is a great instance of what canonical links are for. In the words of Google (presumably in the article above) you giving them a hint that you want the page to show up in SERPs as your the format you designate.

Additionally, it helps you keep your traffic from being diluted (in the eyes of a search engine) as if these are 3 separate pages and would alleviate any chance that the content would be considered duplicate.

A word of caution though, if there are pages with categories of products (multiple products on a page) those pages/products should not include canonical links. I don't know if it's 'official' but some WordPress SEO plug-ins use rel="bookmark" on the permalinks (instead of canonical) on pages where there are multiple listings. I'd assume the same would be wise for products.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.