Author Topic: Why index children on VM3  (Read 343 times)

soweto

  • Beginner
  • *
  • Posts: 1
Why index children on VM3
« 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?

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1720
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Why index children on VM3
« Reply #1 on: August 23, 2018, 18:52:17 pm »
Use canonical url. Leave no category for the child products.
Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3353
  • using Matomo instead of Google Analytics
Re: Why index children on VM3
« Reply #2 on: August 23, 2018, 21:42:37 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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3389
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Why index children on VM3
« Reply #3 on: August 23, 2018, 22:21:34 pm »
JJK, your link say that
Quote
which 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.

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 210
    • Bulgarian Computer Store
Re: Why index children on VM3
« Reply #4 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:
Code: [Select]
$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:
Code: [Select]
<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:
Code: [Select]
<link href="https://site-name/product-name" rel="canonical" />

But let SEO masters say if that's okay.
No pain, no gain, no site!

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3389
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: Why index children on VM3
« Reply #5 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.

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 210
    • Bulgarian Computer Store
Re: Why index children on VM3
« Reply #6 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.

No pain, no gain, no site!

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3389
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: Why index children on VM3
« Reply #7 on: August 24, 2018, 15:57:11 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

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 210
    • Bulgarian Computer Store
Re: Why index children on VM3
« Reply #8 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.
No pain, no gain, no site!