Post by ianhaney » Mon Jun 01, 2020 2:48 am

I have a o/c 2.0.3.1 store and I need bit of help with duplicate content and canonical urls. If I visit https://www.domain.co.uk/shop/Cables-Ad ... -Lightning and https://www.domain.co.uk/shop/Apple-Lightning, they are the same content and worried Google is seeing duplicate content. The categories, subcategories and products are imported from a suppliers feed

I checked the source code and both urls have canonical urls, the first urls canonical is <link href="https://www.domain.co.uk/shop/Cables-Ad ... -Lightning" rel="canonical" /> and the second url canonical is <link href="https://www.domain.co.uk/shop/Apple-Lightning" rel="canonical" />

I am worried Google is getting confused and seeing duplicate content

Is there anything I can do to fix it so it goes to only one url such as https://www.domain.co.uk/shop/Cables-Ad ... -Lightning and the same for all other parent and sub categories so if try to visit https://www.domain.co.uk/shop/sucategoryname it redirects to https://www.domain.co.uk/shop/parent-ca ... ubcategory

Hopefully that makes sense

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by ianhaney » Mon Jun 01, 2020 7:21 pm

Not sure if have solved it but I found the following line in catalog/controller/product/category.php

Code: Select all

$this->document->addLink($this->url->link('product/category', 'path=' . $this->request->get['path']), 'canonical');
I commented out that line and only got the canonical tag showing in the parent category url now at https://www.it-doneright.co.uk/shop/Cab ... -Lightning

I can still access both pages as different urls https://www.it-doneright.co.uk/shop/Cab ... -Lightning and https://www.it-doneright.co.uk/shop/Apple-Lightning but only the first parent category url shows the canonical tag

I am guessing that’s a good thing as will work that way and Google now won’t see duplicate content as am guessing it’s now telling Google that https://www.it-doneright.co.uk/shop/Cab ... -Lightning is the main url

Is that right and would that work?

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by paulfeakins » Mon Jun 01, 2020 7:53 pm

I suggest you buy an SEO extension to fix this.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by ianhaney » Mon Jun 01, 2020 8:03 pm

paulfeakins wrote:
Mon Jun 01, 2020 7:53 pm
I suggest you buy an SEO extension to fix this.
Is there any you recommend?

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by paulfeakins » Tue Jun 02, 2020 5:50 pm

ianhaney wrote:
Mon Jun 01, 2020 8:03 pm
Is there any you recommend?
I'd recommend reading this to help you find one:
https://www.antropy.co.uk/blog/how-to-f ... xtensions/

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 14 guests