Post by tom327 » Thu Aug 05, 2021 7:03 am

I replaced my current store with an opencart based store, and need to"301 Redirect" many of my old product category pages from the old store to the new store.
But I was a somewhat confused by an aspect of opencart.

For example, on my old site I have toasters category:
http://www.oldsite.com/toasters

I need to redirect it to my new site.
But on opencart, I created a Product category, and then made sub-categories for the different products, so my 'toaster category page" on new site has this url:
https://www.newsite.com/products/toasters

I like using this URL as well inside my site to link to because it maintains the correct breadcrumb of : home > products > toasters

But, I noticed the page has a canonical tag set to:
http://www.newsite.com/toasters

So, I am not sure what I should redirect to: the URL with 'products" included or the canonical url.
Is one better for SEO?
The canonical url also is not https, and my site automatically redirects non-https to https, so that is another consideration.

Active Member

Posts

Joined
Thu Feb 16, 2012 7:33 am

Post by ADD Creative » Thu Aug 05, 2021 7:58 am

You should redirect to the canonical URL, as that is the one search engines will probably index. You would just be giving them more work by redirecting somewhere else.

If you canonical URL is not https, then you config.php files are probably wrong. All URLs in them should start https.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by tom327 » Fri Aug 06, 2021 4:50 am

ADD Creative wrote:
Thu Aug 05, 2021 7:58 am
You should redirect to the canonical URL, as that is the one search engines will probably index. You would just be giving them more work by redirecting somewhere else.

If you canonical URL is not https, then you config.php files are probably wrong. All URLs in them should start https.
Yes, it is strange that the canonical url in <head> area is http and not https.
The rest of my site uses https both front of store and admin.

Do you know what I should check in my config files?
Here is part of my config files below, the part that is seems to relate to http and https.
Is anything wrong here?

Code: Select all

Admin Config

// HTTP
define('HTTP_SERVER', 'http://www.mysite.com/admin/');
define('HTTP_CATALOG', 'http://www.mysite.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.mysite.com/admin/');
define('HTTPS_CATALOG', 'https://www.mysite.com/');



Root Config

// HTTP
define('HTTP_SERVER', 'http://www.mysite.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.mysite.com/');
Thanks for you help.

Active Member

Posts

Joined
Thu Feb 16, 2012 7:33 am

Post by ADD Creative » Fri Aug 06, 2021 7:04 am

Change the HTTP_SERVER and HTTP_CATALOG URLs so they all start with https://.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by tom327 » Tue Aug 10, 2021 6:37 am

Thank you Add Creative!

I followed your instructions, and now all my meta canonical links start with https:// in my page head areas.

Active Member

Posts

Joined
Thu Feb 16, 2012 7:33 am
Who is online

Users browsing this forum: No registered users and 42 guests