Page 1 of 1

Canonical URLs for the CATEGORY pages.

Posted: Thu Mar 01, 2012 4:09 pm
by DragonJ
When I converted my store to OC, apparently Google indexed the categories very fast -- before I had a chance to create SEO URLs for all the categories (about 900 of them).

I have since SEO URL'd all the categories and now there's a duplicate content problem when I do a Google "site:mysite.com" search.

It will show results for...

www,example,com / index.php?route=product/category&path=329_357

... as well as...

www,example,com / category-357.html

Both of those pages are showing identical content and when I viewed the source code, I saw there weren't any <link href="..." rel="canonical" /> tags. All of the product pages have this tag for the purpose of avoiding duplicate content. Is there any reason why the categories don't have this? I've searched the forums for an answer with no luck. :(

Re: Canonical URLs for the CATEGORY pages.

Posted: Thu Mar 01, 2012 5:22 pm
by uksitebuilder
categories dont have canonical urls because they are only accessible by one route

your situation is unique in that you switched from Non-SEO URLs to SEO URLs after Google had already indexed the none SEO URLs

I created a category canonical vqmod file here if it helps -> http://forum.opencart.com/viewtopic.php ... 42#p202890

Re: Canonical URLs for the CATEGORY pages.

Posted: Fri Mar 02, 2012 3:11 am
by DragonJ
YES IT HELPS! It works great. Thank you. :)

Re: Canonical URLs for the CATEGORY pages.

Posted: Sun Mar 11, 2012 1:34 am
by stonehinged
Couldn't subcategories have 2 routes though?

.../category/subcategory/product

and

.../subcategory/product

Granted, it looks as if there's no way to navigate directly to the subcategory version of the url, but both resolve to the same page. Would it be better to address with a rewrite in htaccess? Or is there any need for concern here?

Curious to hear thoughts.

Re: Canonical URLs for the CATEGORY pages.

Posted: Tue Mar 13, 2012 12:41 am
by uksitebuilder
The canonical URL should take care of any multiple access paths

Re: Canonical URLs for the CATEGORY pages.

Posted: Thu Apr 19, 2012 11:33 pm
by stonehinged
Simon, been reading up a bit on Google supporting rel="prev" and rel="next" to indicate the relationship between component URLs in a paginated series. Seems to me that this would be far prefered than the rel="canonical" approach on category pages since additional pages are indeed unique content.

Any thoughts about how to take your vQmod and write conditions to inject the link attribute rel="next" and/or rel="prev" similar to this:

On the first page, http://www.example.com/article?story=abc&page=1, you’d include in the <head> section:
<link rel="next" href="http://www.example.com/article?story=abc&page=2" />

On the second page, http://www.example.com/article?story=abc&page=2:
<link rel="prev" href="http://www.example.com/article?story=abc&page=1" />
<link rel="next" href="http://www.example.com/article?story=abc&page=3" />

On the third page, http://www.example.com/article?story=abc&page=3:
<link rel="prev" href="http://www.example.com/article?story=abc&page=2" />
<link rel="next" href="http://www.example.com/article?story=abc&page=4" />

And on the last page, http://www.example.com/article?story=abc&page=4:
<link rel="prev" href="http://www.example.com/article?story=abc&page=3" />

I wish I had enough smarts to write the code for this as I think it would open up a lot of opportunity for sites otherwise limiting themselves unnecessarily. I'm still learning and experimenting. I really envy this development community!

More here: http://googlewebmastercentral.blogspot. ... lprev.html

Thoughts?

Re: Canonical URLs for the CATEGORY pages.

Posted: Wed Sep 18, 2013 2:56 pm
by xdomofab
One of the biggest mistakes a webmaster and their clients can make is using the same exact canonical URL on category pages and category pagination pages. Since the results on pages 2, 3, 4 ... are different from page 1, you should not use the same exact canonical tag here.

Canonical URL + Pagination Rel=Prev/Next Best Practices

Add Rel=Canonical tag to category/category pagination and brand/brand pagination
Add Rel=Prev/Next tag to category pagination and brand paginatioin

The most current technique for SEO pagination makes use of the HTML 4/5 link element pagination rel=”next” and rel=”prev” tag. Keep in mind that all rel=next/prev pages should also have a self-referencing rel=canonical tag. In cases where tracking IDs and various sort orders are appended to a URL, these rel canonical tags will ensure no duplication and equity leak occurs.

Re: Canonical URLs for the CATEGORY pages.

Posted: Tue Oct 14, 2014 8:20 pm
by diwakar007
thanks Simon, But it made the Sub Category URL as separate URL that mean it's not including it's parent in its canonical url.