Post by bifflowman » Fri Jan 10, 2014 6:02 am

For SEO purposes we are moving all product details to the category pages and have removed all links to the product pages. Just to be safe I want tell search engines not to index our product pages.

Do I simply add the following to the header of the product.tpl?

Code: Select all

<meta name="robots" content="noindex follow" />
Also, is there a way to tell search engines not to index specific categories?

New member

Posts

Joined
Fri May 04, 2012 12:12 pm
Location - Barrington IL

Post by victorj » Sat Jan 11, 2014 6:35 am

adding

Code: Select all

<meta name="robots" content="noindex follow" />
to your header would result in blocking search engines for your entire site, as the header is shown on each page.

best is to use robots.txt in root af site, and set here wich pages should not be followed

do a search on robots.txt and you find how to set up that file

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by bifflowman » Sat Jan 11, 2014 6:44 am

Hi Victorj,

Thanks, I certainly don't want to block the entire site.

The problem is, we have about 150,000 product pages that we don't want indexed. I cant put them all in the robots.txt

They are the only urls that end in .html Could I safely specify not to index .html pages in the robots.txt?

New member

Posts

Joined
Fri May 04, 2012 12:12 pm
Location - Barrington IL

Post by victorj » Sat Jan 11, 2014 7:00 am

robots.txt is quiete flexible in what you want to block for search engines, and it also supports wildcards, just dig into that, so you can write a specific ane to suit your site

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by bifflowman » Sat Jan 11, 2014 12:40 pm

From what I understand, the following should do the trick.

Disallow: /*.html$
Disallow: /*?route=product/product

If anyone has any suggestions, feel free to post them.

New member

Posts

Joined
Fri May 04, 2012 12:12 pm
Location - Barrington IL

Post by mijomedia » Sat Jun 14, 2014 8:57 pm

I know this is an old post but i have the solution for you.

To just put some code into robots.txt will not "unindex" your product pages.

I have made a VqMod that will put <meta name="robots" content="noindex,follow"> in specified pages.

Here's a code for your problem:


You need to put some code in several files.

catalog/controller/common/header.php

Find

Code: Select all

$this->data['links'] = $this->document->getLinks();
Put after:

Code: Select all

$this->data['robots'] = $this->document->getRobots();
catalog/view/theme/YOUR THEME/template/common/header.tpl

Find:

Code: Select all

<?php if ($description) { ?><meta name="description" content="<?php echo $description; ?>" /><?php } ?>
Put before:

Code: Select all

<?php if ($robots) { ?><meta name="robots" content="<?php echo $robots; ?>" /><?php } ?>
system/library/document.php

Find line:

Code: Select all

[private $description;
Put before:

Code: Select all

private $robots;
Also find the line:

Code: Select all

public function setDescription($description) {
Put before:

Code: Select all

public function setRobots($robots) {$this->robots = $robots;}public function getRobots() {return $this->robots;}


Now when we have done the most crucial part we need to make so your product pages won't be indexed. This is the easiest part :).

catalog/controller/product/product.php

Find:

Code: Select all

$this->language->load('product/product');
Put after:

Code: Select all

$this->document->setRobots('noindex,follow');
This will make all your product pages have the meta tag: <meta name="robots" content="noindex,follow">. You can also use this technique on other pages as well, just find the right file and put the code into it. The controller files does controll what is visible on the tpl files.

Hope this will help someone.

/Mijo Media

Webbutveckling, Sökmotoroptimering, E-handel, Mobilskal, Tillbehör för surfplattor och tillbehör för mobiler


User avatar
New member

Posts

Joined
Fri May 17, 2013 7:54 am

Post by kargaa » Tue Oct 28, 2014 9:12 pm

This plugin is doing things easly with vqmod.You could add product pages also.

http://www.opencart.com/index.php?route ... n_id=17863

Antalya Escort


Newbie

Posts

Joined
Wed Sep 03, 2014 6:00 pm

Post by kyuss » Sat Jun 20, 2015 1:02 am

@kargaa: That extension is actually from @mijomedia (the guy that answered above)... lol!
-------------------------------------------------------------------------------------------------

Anyone know how to add SPECIFIC product pages to that extension?

Code: Select all

ie) /index.php?route=product/product&product_id=83
I need to remove product pages from Index occasionally, looking for a relatively easy way to update which pages should be removed... this looks like my best bet, if I can get it working. Thx.

New member

Posts

Joined
Sat Dec 01, 2012 2:32 am
Who is online

Users browsing this forum: No registered users and 81 guests