Skip to main content

Best way to Selectively No Index Some Products

More
11 years 7 months ago #189801 by sison2466
-- url of the page with the problem -- : iheartsin.com
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.29

I keep reading articles that I should change the product descriptions that I get from manufacturers, as I could be SEO penalized due to duplicate content.

I am in the process of rewriting the most popular products, but for items that I don't want to invest the time in rewriting, articles are suggesting I set them up as no index. What is the easiest way to set some, but not all of the product as no index?

Also, for Hikamarket, if the product is listed on the Vendor page and on the main site, is that going to be considered duplicate content as well?

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #189805 by nicolas
Hi,

1.
Create a custom product field via the menu display>Custom fields with two values rel="nofollow" and empty.
Then, in your products that you don't want to index, select the rel="nofollow" choice for the custom field.
In the file "listing_img_title" of the view "product" (supposing that you're using the "image and title" item layout), just change the line:
<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">
to:
<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>" <?php echo $this->row->FIELD;?>>

where FIELD should be replaced by the column name of your custom field.

2. Pages which are accessed after a login/registration are not indexed by Google so no problem there.
The following user(s) said Thank You: levelup

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago - 11 years 6 months ago #195789 by sison2466
If I paste the code below into the the file, I get a 404. When you say using a "image and title" item layout, where do I check that setting?

<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>" <?php echo $this->row->nofollow;?>>

To clarify, "nofollow" is the name of my column.
Last edit: 11 years 6 months ago by sison2466.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #195793 by Jerome
Hi,

A 404 ? Would it be possible to have an example ?
Your custom field "nofollow" should contain a full html tag, like
Code:
nofollow="nofollow"
otherwise it can break the HTML content and provide a non-working link.
It's the single idea I got.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #195895 by sison2466
I am not sure I understand. I'll explain what I did. If that doesn't work, I'll set up a test server and make the changes so it will 404.

I have a custom field labeled "No Index" associated with a column name for my product called "nofollow"
I set the default value to equal rel="nofollow" (pic attached)

I then go to the listing_img_title file of PRODUCT under DISPLAY->VIEWS for the front end of my specific template

I replace

<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">

with

<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>" <?php echo $this->row->nofollow;?>>

should the nofollow above be No Index?

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #195911 by nicolas
Hi,

I don't see why that change would generate a 404 error since you don't change the href attribute of the link.
On top of that, your modification is correct so it should work fine.
The 404 error must come from something else.
Do you mean that if you remove the modification you don't get the 404 and if you add it back you get it again ?
That would be really strange.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #196216 by sison2466
I'm an idiot...not sure what I did differently, but it's working now. Sorry to waste your time.

One last question. Anyway to make sure that I set up the "nofollow" to actually working properly?

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #196222 by nicolas
Hi,

Right click on the link and click on the "inspect element" (or something similar) choice and that will open your browser's debugger and you'll see the HTML of the link. There, see if you get the rel="nofollow" added to the link and you'll see if that works or not.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #196338 by sison2466
Doesn't look like what I did worked. I see "nofollow" for some social links, but not a product.

view-source:http://www.modelmisconduct.com/index.php/shop/product/hosiery-1565

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #196731 by sison2466
Hi Nicolas,

I just wanted to follow up on my prior post, as it does not look like the changes I made are working.

Doesn't look like what I did worked. I see "nofollow" for some social links, but not a product.

view-source:http://www.modelmisconduct.com/index.php/shop/product/hosiery-1565

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #196781 by sison2466

Create a custom product field via the menu display>Custom fields with two values rel="nofollow" and empty.
Then, in your products that you don't want to index, select the rel="nofollow" choice for the custom field.


Also stupid question, but if the purpose is to not receive penalty for duplicate content, don't I want "noindex", rather than "nofollow"?

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #196869 by Jerome
Hi,

You're editing the view "listing_img_title", right ?
So I don't understand why are you giving a link to a product page which does not contains any product listing module ; the modification you made won't be visible in the product page.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago - 11 years 5 months ago #196944 by sison2466
Hi Jerome,

Thank you for responding. Perhaps I am unclear.

I keep reading articles that I should change the product descriptions that I get from manufacturers, as I could be SEO penalized due to duplicate content.

I am in the process of rewriting the most popular products, but for items that I don't want to invest the time in rewriting, articles are suggesting I set them up as no index. What is the easiest way to set some, but not all of the product as no index?


The content (specifically the product description) that I want to control whether is index/crawled by search engines are on the product page like the one below.

www.modelmisconduct.com/index.php/shop/product/hosiery-1565

My question is what is the best way to no have some,but no all my products not get crawled?

If I need to clarify further, please let me know.

Regards,

Marco
Last edit: 11 years 5 months ago by sison2466.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #196946 by Jerome
Hi,

See : developers.google.com/webmasters/control...docs/robots_meta_tag

About the duplicate content, use Canonical url
See : moz.com/learn/seo/duplicate-content

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #197013 by sison2466
Hi Jerome,

My Question is if there is a way to set <meta name="robots" content="noindex" /> on individual products? Perhaps using the method you guys suggested with custom fields?

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #197094 by Xavier
Hi,

To add a meta tag on some products, you can indeed use custom product fields, create one for example meta_noindex with a default value set as "false", then in the product edition page change the field value to "true" for the desired products. Don't display it on frontend.

And edit the view "product / show_default", then add code like:
Code:
<?php if($this->row->meta_noindex == 'true'){ $doc = JFactory::getDocument(); $doc->addCustomTag( '<meta name="robots" content="noindex" />' ); } ?>

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #197493 by sison2466
Just to confirm, if we WANT the product to be indexed/crawled, the the noindex value should = "false"?

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #197513 by nicolas
Hi,

The code Xavier gave you will add the metatag to the page only if the value of the custom field is "true". So if you set anything else in it, including false, it won't add it.

Please Log in or Create an account to join the conversation.

More
11 years 6 days ago - 11 years 6 days ago #215008 by sison2466
What is the best way to confirm we did this correctly?

I set item 4016 to true



but when I view source, I don't see anything that states noindex
<meta name="robots" content="noindex" />
view-source:http://www.modelmisconduct.com/hikashop-menu-for-brands-listing/lacy-satiny-chemise-sexy-after-dark-4016
Last edit: 11 years 6 days ago by sison2466.

Please Log in or Create an account to join the conversation.

More
11 years 6 days ago #215020 by Jerome
Hi,
Code:
if($this->row->meta_noindex == 'true'){
In the code I can read "true" and not "TRUE" ; which are for a code aspect, different strings.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.320 seconds
Powered by Kunena Forum