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.
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.
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.ADD Creative wrote: ↑Thu Aug 05, 2021 7:58 amYou 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.
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/');
Change the HTTP_SERVER and HTTP_CATALOG URLs so they all start with https://.
Who is online
Users browsing this forum: jainyvardhman and 5 guests