Mobile app version of vmapp.org
Login or Join
Mendez628

: How to use rel='canonical' properly 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

@Mendez628

Posted in: #CanonicalUrl #DuplicateContent #Google #Links #Seo

I have 3 URLS that serve the same data:

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

For Google's sake I want the URL 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 www.example.com/product/foo.
Is there any issue with doing this or does having a circular canonical not cause any issues?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Mendez628

2 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas447

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.

10% popularity Vote Up Vote Down


 

@Dunderdale272

There's no circularity implied by having <link rel='canonical' href='http://www.example.com/product/foo' /> appear as www.example.com/product/foo.
That's the intent. You're saying "the best URL" for this page is www.example.com/product/foo, so when the search engines hit www.example.com/product/foo?id=1, or 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."


More about rel="canonical" from Google
existing-rel-values at microformats.org

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme