VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: soweto on August 23, 2018, 15:59:30 PM

Title: Why index children on VM3
Post by: soweto on August 23, 2018, 15:59:30 PM
Hello,

I do not understand why VM3 is set to index child products. Why not leave the choice to people?

Result. My pages indexed on Google have decreased because of duplicate content.

What solution please?
Title: Re: Why index children on VM3
Post by: Jörgen on August 23, 2018, 18:52:17 PM
Use canonical url. Leave no category for the child products.
Jörgen @ Kreativ Fotografi
Title: Re: Why index children on VM3
Post by: jjk on August 23, 2018, 21:42:37 PM
Quote from: soweto on August 23, 2018, 15:59:30 PM
Result. My pages indexed on Google have decreased because of duplicate content.

Google does not penalize a website if it contains duplicate content. Please read: https://support.google.com/webmasters/answer/66359?hl=en
Title: Re: Why index children on VM3
Post by: Studio 42 on August 23, 2018, 22:21:34 PM
JJK, your link say that
Quotewhich Google perceives that duplicate content may be shown with intent to manipulate our rankings and deceive our users, we'll also make appropriate adjustments in the indexing and ranking of the sites involved. As a result, the ranking of the site may suffer, or the site might be removed entirely from the Google index, in which case it will no longer appear in search results.
So if google think that you try to fake user, your site can be removed.
And by experience, i can say that had already customer that contacted me because they had duplicate (and not whole pages) content to get better page rank and was partial blacklisted.
After 1 year and removing all duplicate content, they dont reached the page rank they had before.
Si i think that for some websites, they have to set same canonical in child as in parent product, or add noindex + nofollow.
Title: Re: Why index children on VM3
Post by: Ventsi Genchev on August 24, 2018, 10:58:42 AM
In my opinion, everyone should be able to choose whether the product is canonical or not.
Allowing children products without category may be good in some cases. But I do not use the parent product. On my page, it is being unpublished.

I did not think about this, but in my opinion the easiest option is this:
(I use product length because this unit does not matter to me. Any other can be used.)
1. In the product description, you specify a length greater than 0
2. Add to the file /templates/your_theme/html/com_virtuemart/productdetails/default.php (overwritten file)
the following code:

$document = JFactory::getDocument ();
if ($product->product_length > 0) {
  $document->addHeadLink( JUri::getInstance()->toString(array('scheme', 'host', 'port')).JRoute::_($product->canonical), 'noindex', 'rel', '');
  $document->setMetaData( 'robots', 'noindex' );
}


In this way, the code of all products that you set a length greater than zero will be:

<meta name="robots" content="noindex" />
<link href="https://site-name/product-name" rel="noindex" />


I'm using "$document->setMetaData" instead of "$document->addCustomTag" to allow the code to go up to the other meta data.

In products where the length is zero, there will be as before:

<link href="https://site-name/product-name" rel="canonical" />


But let SEO masters say if that's okay.
Title: Re: Why index children on VM3
Post by: Studio 42 on August 24, 2018, 13:13:30 PM
Ventsi, it's a solution, but cannot be used for all, so it should exist a meta-robot default setting for the product childs.
Title: Re: Why index children on VM3
Post by: Ventsi Genchev on August 24, 2018, 13:26:19 PM
Yes, I agree. But in the absence of a solution, I think this is easiest.  :)
If there were separate settings in each product, there would be no need for such gymnastics.

In my case, the parent product is unpublished.
I choose which of the childs products to be canonical, and the rest I do noindex. Because the description is the same for all childs products, while everything else is different (title, etc.).
So, on my website, all childs products can not be noindex because I do not have a parent product published.

Title: Re: Why index children on VM3
Post by: Studio 42 on August 24, 2018, 15:57:11 PM
Quote from: Ventsi Genchev on August 24, 2018, 13:26:19 PM
Yes, I agree. But in the absence of a solution, I think this is easiest.  :)
If there were separate settings in each product, there would be no need for such gymnastics.
You have a setting per product, but dont know if Virtuemart use it
Description : Meta Information>Meta Robots
Title: Re: Why index children on VM3
Post by: Ventsi Genchev on August 24, 2018, 17:25:34 PM
 :D
I did not pay attention to that.
Yes, it works, but the product remains canonical. I do not know if that matters.

EDIT:
Question: Is it okay to have both a rel canonical and a no index no follow on the same page?
John Mueller (Google): No, you should not combine the noindex with a rel-canonical pointing at an indexable URL. I'd pick one, but not both.