News:

Looking for documentation? Take a look on our wiki

Main Menu

Canonical tag multiple categories

Started by jeroenmulder, April 03, 2013, 14:30:59 PM

Previous topic - Next topic

jeroenmulder

Hello all,

I have a duplicate content issue.
When a product is published in multiple categories, Virtuemart generates for both product urls a canonical tag. E.g.

www.site.com/coffee/espresso  (canonical www.site.com/coffee/espresso )
www.site.com/sale/espresso  (canonical www.site.com/sale/espresso )

I think it must be like:
www.site.com/coffee/espresso  (canonical: www.site.com/coffee/espresso )
www.site.com/sale/espresso  (canonical:  www.site.com/coffee/espresso)

I am using Joomla 2.5.9 and VM2.020B with standard VM SEF urls (no 3rd party).

Does someone has an solution for this problem?
Removing the category in the URL is not an option for me.
Thanks in advance.

Jeroen

Peter Pillen

This has already been mentioned a few times. Unfortunately, not everybody shares the same view about this canonical tag. I actually agree with you (because I also got the duplicate content meta problem with these canonicals). But I "solved" it by disabling my productdetail pages from being indexed. I have short-life-time products with very little description and other info and having them indexed after 3 months, just made no sense for me. I disallowed productdetails from being indexed with robot.txt, my duplicate warnings dropped and I got a little increase in organic traffic from Google.

tobias_conrad

Hi, is there a solution? Did you find a solution?
Maybe the best set of extensions in a gorgeous template for less than 50$.
http://clicky.me/gorgeous-template

Peter Pillen

From VM version 2.0.24 the problem with the canonicals is fixed

tobias_conrad

hi,

wonderfull. So i need to know how it is fixed?
What should i answer when a customer ask me "How do you point to only one Product which is in more than one categorie?
How does virtumart know which copy of the Productpage is the most wanted by google and the audience?
Maybe the best set of extensions in a gorgeous template for less than 50$.
http://clicky.me/gorgeous-template

Peter Pillen

#5
QuoteHow does virtumart know which copy of the Productpage is the most wanted by google and the audience?
Virtuemart can never automatically know which version is the best for the audience and Google. Even more ... Google does not care which version you want to present, as long as you only present "one" version for reasons of duplicate content. If a products shows up in three categories, Google will crawl and index all three of them, but will present the canonical-url page in the search results. In the end, Google has all the info of the three versions and knows which version (thanks to canonical) the webmaster prefers. But keywords in the urls from the other two versions will also be known by Google. Meta info of all three versions remain the same.

Currently I believe that virtuemart uses three pieces of info to make up the canonical
1. the joomla menu-alias of your virtuemart pages (ex: webshop)
2. the top level product category where you product is in (ex: womens-shoes) Category levels lower than this are not used.
3. the article-alias of a product aka slug (ex: louboutin-red-sole-pumps-nr25314-detail)

In this way you can fiddle arround a bit but this how virtuemart automatically creates canonicals. If your client does not like this, you will need to adapt the way the canonicals are made. The basics for all the canonical tags are placed in the view.html.php of each view. For example \components\com_virtuemart\views\productdetails\view.html.php has the code for canonical of productpages.

aragraf

#6
Hello dudes
So after a long brainstorming I found this solution for duplicate urls.
In the route.php I have added this line.
linenumber 177
$segments = array($helper->getProductName($virtuemart_product_id));
I think this is a best solution for now.
Also I have attached my route.php