Page 1 of 3

SEO Module Error - Duplicating URL's

Posted: Sat Nov 14, 2009 10:22 am
by moggiex
Howdy,

Not sure if anyone has noticed yet, but open cart allows the doubling up (well N up) of the same product pages.

err, here is an example:
A product may live here:
http://www.domain.co.uk/Alicia-Feetham.html
http://www.domain.co.uk/category/Alicia-Feetham.html
http://www.domain.co.uk/category/sub-ca ... etham.html

Spotted the issue yet? Google won't like you for this because you are duplicating content (just like not redirecting http://domain.ext to http://www.domain.ext)

So the simple method of resolving this is by not accounting the for the category in the URL.

./catalog/controller/product/category.php

Around line: 142

Code: Select all

$this->data['products'][] = array(
            			'name'    => $result['name'],
						'model'   => $result['model'],
            			'rating'  => $rating,
						'stars'   => sprintf($this->language->get('text_stars'), $rating),
						'thumb'   => image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
            			'price'   => $price,
						'special' => $special,
						'href'    	=> $this->model_tool_seo_url->rewrite($this->url->http('product/product&path=' . $this->request->get['path'] . '&product_id=' . $result['product_id']))
          			);
Change the last line to:

Code: Select all

'href'	=> $this->model_tool_seo_url->rewrite($this->url->http('product/product&product_id=' . $result['product_id']))
Thus, now no duplication of content.

Matt

Re: SEO Module Error - Duplicating URL's

Posted: Sat Nov 14, 2009 10:54 pm
by johnhao
I will try it ,Thanks .

Re: SEO Module Error - Duplicating URL's

Posted: Sun Nov 15, 2009 7:10 am
by moggiex
Infact this hack isn't perfect, as you'll loose the sub category you're viewing from the category menu, probably need someone a little more skilled that I, to resolve properly.

Matt

Re: SEO Module Error - Duplicating URL's

Posted: Tue Nov 17, 2009 5:40 am
by towerofbabel
Documenting some of the history of this issue:

http://forum.opencart.com/viewtopic.php?f=10&t=5764

Re: SEO Module Error - Duplicating URL's

Posted: Tue Nov 17, 2009 5:43 am
by Daniel
this is not an error. products can have multiple categories. what do you expect?

I think google can just filter out pages depending the title.

Re: SEO Module Error - Duplicating URL's

Posted: Tue Nov 17, 2009 5:56 am
by moggiex
Daniel wrote:this is not an error. products can have multiple categories. what do you expect?

I think google can just filter out pages depending the title.
You're right on face value its not an error, but natural, however it is to a search bot, a duplication of content and in theory content is unique and should only appear the once.

See this search to help some shed some light on the duplicate content penalty:
http://www.google.co.uk/search?rlz=1C1G ... nt+penalty

Googles own messaging on this topic:
http://googlewebmastercentral.blogspot. ... ntent.html

Kind regards,

Matt

Re: SEO Module Error - Duplicating URL's

Posted: Thu Dec 10, 2009 8:50 am
by MitchMcBride
The right way around this issue is to have a primary category for each product which is used in the SEO URL. That way regardless of the category path taken to get to the product, there is only one product URL.

Example:
Sony 50" Bravia LCD TV
Primary Category
  • Electronics > Televisions > LCD
Other Categories
  • Electronics > Televisions > 40 - 65 Inch
  • Electronics > Televisions > HDTV
  • On Sale
The URL would always be http://www.domain.com/Electronics-Telev ... via-LCD-TV even it were browsed to from Electronics > Televisions > HDTV.

The product crumb trail would have to be populated using cookies instead of the URL to preserve navigation.

Re: SEO Module Error - Duplicating URL's

Posted: Wed Dec 23, 2009 11:44 pm
by Xa-uBaH
It is necessary to modify the Manifacturer URL ... it also produces duplicate titles and meta in google

Re: SEO Module Error - Duplicating URL's

Posted: Sat Jan 16, 2010 6:22 pm
by Jon Stringer
Hi Just started using open cart.

Looks ok so far. However, I also have this issue.

I will only be using catagories not subcatagories. However, when browsing by "brands" this creates duplicate product url's eg:-

http://www.baby-stores.co.uk/baby-bounc ... by-bouncer

is ok. But then by brand it becomes...

http://www.baby-stores.co.uk/fisher-pri ... by-bouncer

Is there a way to modify the links generated when browsing through brands only. If so the simple way to fix this would be to add a rel="nofollow" tag to the product links only generated by browsing by brand?

Still need to have a good look through the code ;-)

Re: SEO Module Error - Duplicating URL's

Posted: Mon Jan 18, 2010 9:47 pm
by Daniel
how about I change the titles so that it looks like this:

Product 1
Category 1 :: Product 1
Manufacturer 1 :: Product 1

To be honest you guys are just getting the wrong informatio about SEO and duplicate content.

Re: SEO Module Error - Duplicating URL's

Posted: Tue Jan 19, 2010 12:00 am
by Leon
MitchMcBride wrote:The right way around this issue is to have a primary category for each product which is used in the SEO URL. That way regardless of the category path taken to get to the product, there is only one product URL.

Example:
Sony 50" Bravia LCD TV
Primary Category
  • Electronics > Televisions > LCD
Other Categories
  • Electronics > Televisions > 40 - 65 Inch
  • Electronics > Televisions > HDTV
  • On Sale
The URL would always be http://www.domain.com/Electronics-Telev ... via-LCD-TV even it were browsed to from Electronics > Televisions > HDTV.

The product crumb trail would have to be populated using cookies instead of the URL to preserve navigation.

Agree 99%.
Though in my view, the URL would be http://www.domain.com/Electronics/Telev ... via-LCD-TV regardless of where the product was browsed to from.
And the product crumb would also show Home > Electronics > Televisions > LCD > Sony 50" Bravia LCD TV regardless of where the product was browsed to from.

For me it's nothing about SEO or duplicated content.
I just want to make it easier for my users to be able to browse around the website.

If i see:
http://www.domain.com/Electronics/Telev ... via-LCD-TV
I know that if i delete "LCD/Sony-50-Bravia-LCD-TV" from the end of the url, i know i will see all the televisions.

If i see:
Home > Electronics > Televisions > LCD > Sony 50" Bravia LCD TV
I know that if i click on LCD, i will see all LCD televisions.

http://www.domain.com/Song-50-Bravia-LCD-TV
and
Home > Sony 50% Bravia LCD TV
are about as useful as an inflatable dartboard.

Also, if you factor in SEO/duplicated content, it can only get better.

Re: SEO Module Error - Duplicating URL's

Posted: Tue Jan 19, 2010 12:54 am
by Xsecrets
so how would you go about picking which category to show? you do realize products can be associated with multiple categories right? and do you still want to show the category when you are browsing by manufacturers?

Re: SEO Module Error - Duplicating URL's

Posted: Tue Jan 19, 2010 2:09 am
by Leon
As MitchMcBride said, set the primary category which is the one that shows, then have other categories.
As browsing by manufacturer - what difference would it make?

Re: SEO Module Error - Duplicating URL's

Posted: Tue Jan 19, 2010 3:29 am
by Xsecrets
Leon wrote:As MitchMcBride said, set the primary category which is the one that shows, then have other categories.
As browsing by manufacturer - what difference would it make?
well some people see the breadcrumb as just that a way to get back to where you came from so if you have a category in there when you came from a manufacturer page then you wouldn't be going back where you came from. I had a client throw a fit on another solution because the breadcrumbs didn't show specials or new products when you came from that page. As far as SEO duplicate content it would make a difference because category/product would be the same as manufacturer/product and thus duplicate content.

Re: SEO Module Error - Duplicating URL's

Posted: Tue Jan 19, 2010 4:41 am
by Leon
I suppose it's just personal preference.
I quite like the way that dabs.com and ebuyer.com do it actually.
URL shows only product info, breadcrumb shows full preset category path for the product

Re: SEO Module Error - Duplicating URL's

Posted: Thu Jan 21, 2010 12:30 am
by Daniel
reading up on this stuff now:

Quote from Google Central :

“having multiple URLs on the same domain that point to the same content. Like http://www.example.com/skates.asp?color ... nd=riedell and http://www.example.com/skates.asp?brand ... olor=black. Having this type of duplicate content on your site can potentially affect your site’s performance, but it doesn’t cause penalties.”

See the article : http://googlewebmastercentral.blogspot. ... nalty.html

Re: SEO Module Error - Duplicating URL's

Posted: Thu Jan 21, 2010 12:33 am
by Daniel

Re: SEO Module Error - Duplicating URL's

Posted: Thu Jan 21, 2010 12:33 am
by Xsecrets
yes it would be nice to have a canonical solution.

Re: SEO Module Error - Duplicating URL's

Posted: Thu Jan 21, 2010 4:12 am
by rph
Xsecrets wrote:
yes it would be nice to have a canonical solution.
That would also allow for a default product breadcrumb when one isn't present (e.g. products linked from the front page). The problem is I don't think it's doable without database changes.

Re: SEO Module Error - Duplicating URL's

Posted: Thu Jan 21, 2010 4:49 am
by Qphoria
I guess I'm the only one who likes that it can do both.

For posting links, its really simple and clean to post:
www.mysite.com/store/product-a
instead of
www.mysite.com/store/category1-2/subcat1-1/product-a