New products for November 2024: SDEK, Sberbank Installment Plan, Simple Reviews.
→How to transfer module and template purchases from one account to another.
→Best-selling templates and extensions in November 2024: Dream Filter, Microdata, Frame template
→This article covers the key steps for configuring OpenCart to work over HTTPS, including redirection, configuration changes, and accounting for SEO aspects.
→The modifier for OpenCart 3 disables advertising banners in the admin panel, addressing performance and module display issues.
→Transitioning to the HTTPS protocol is not only an important step for improving site security but also a mandatory requirement of modern search engines. This article covers the key steps for configuring OpenCart to work over HTTPS, including redirection, configuration changes, and accounting for SEO aspects.
Before configuring the site to work with HTTPS, you need to purchase or install an SSL certificate. The certificate encrypts data between the server and users, ensuring a secure connection. For small sites or projects, a free SSL certificate such as from Let's Encrypt, which is supported by most hosting providers, will be sufficient. It can be installed through the hosting control panel or with the help of specialized tools.
Enabling HTTPS in Store Settings
Go to the OpenCart admin panel:
Changing Configuration Files
Change in /config.php
at the root of the site from HTTP to HTTPS:
Was:
define('HTTP_SERVER', 'http://liveopencart.ru/'); define('HTTPS_SERVER', 'https://liveopencart.ru/');
Now:
define('HTTP_SERVER', 'https://liveopencart.ru/'); define('HTTPS_SERVER', 'https://liveopencart.ru/');
Change in /admin/config.php
from HTTP to HTTPS:
Was:
// HTTP define('HTTP_SERVER', 'http://liveopencart.ru/admin/'); define('HTTP_CATALOG', 'http://liveopencart.ru/'); // HTTPS define('HTTPS_SERVER', 'https://liveopencart.ru/admin/'); define('HTTPS_CATALOG', 'https://liveopencart.ru/');
Now:
// HTTP define('HTTP_SERVER', 'https://liveopencart.ru/admin/'); define('HTTP_CATALOG', 'https://liveopencart.ru/'); // HTTPS define('HTTPS_SERVER', 'https://liveopencart.ru/admin/'); define('HTTPS_CATALOG', 'https://liveopencart.ru/');
Make sure the file robots.txt
contains the correct rules:
Sitemap: https://liveopencart.ru/sitemap.xml
Add the following code to the .htaccess
file:
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
TimeWeb hosting recommends the following code:
RewriteEngine On RewriteBase / RewriteCond %{HTTP:X-HTTPS} !1 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Beget hosting recommends the following code:
RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !=https RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Please note that the redirection setup depends on many factors, and the provided options may not work correctly for you.
From www to non-www
RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
TimeWeb hosting recommends the following code:
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.forum\.example\.ru$ [NC] RewriteRule ^(.*)$ http://forum.example.ru/$1 [R=301,L]
From non-www to www
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
TimeWeb hosting recommends the following code:
Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^forum\.example\.ru$ [NC] RewriteRule ^(.*)$ http://www.forum.example.ru/$1 [R=301,L]
Please note that the redirection setup depends on many factors, and the provided options may not work correctly for you.
Yandex.Webmaster - more details here.
The robot will learn about the protocol change during its next visit to the site. To speed up the change process, add both versions of the site (HTTP and HTTPS) in Webmaster and notify about the move using the Site Move tool:
Indexing > Site Move
page, enable the Add HTTPS
option. Click Save.In the Database
Run SQL queries via phpMyAdmin
or another database editor to replace the links. Don’t forget to make a backup of the database before making any changes.
UPDATE oc_product_description SET description = REPLACE(description, 'http://', 'https://'); UPDATE oc_information_description SET description = REPLACE(description, 'http://', 'https://'); UPDATE oc_category_description SET description = REPLACE(description, 'http://', 'https://');
In Template Files
Check template files like header.twig
, header.tpl
, footer.twig
, and footer.tpl
to ensure all links are using HTTPS.
External links can be found using the following tools:
Links > External Links > Pages
, you can track links, find redirected links, and identify the most frequently referenced pages and resources.Links > External Links
, all backlinks are displayed. You can check their indexing status.