OpenCart SSL: How to Load All Pages with HTTPS

You’ve enabled an SSL certificate for your OpenCart site, but it disappears from some of the pages?
 

Apache ServerThis tutorial is valid if your OpenCart store is running on an Apache server.


Here’s what you can do to keep every page of your online store secure and ensure your online shoppers feel secure browsing your website.

Step 1

Use your favorite FTP client or File Manager in cPanel and edit your .htaccess file.

OpenCart .htaccess
 

Step 2

Copy and Paste these 3 lines of code in the .htaccess file:
 

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


Save & close!

Step 3

Edit your config.php file in the OpenCart root (underneath the .htaccess file in the above screenshot).

OpenCart config
 

Under the // HTTPS line, change the protocol from http to https.

Save & close!

Step 4

Repeat the same for the config.php file in your admin folder.

OpenCart Admin Folder
 

Open the config.php here:

Config OpenCart
 

Again, underneath the // HTTPS line change both http protocols to https.


 

Save & close!

Congratulations!

Now go back to your OpenCart website and go through the pages.

OpenCart SSL


You will see the SSL certificate active all around your website keeping each page secure.

Customers will now feel they’re browsing and shopping securely from your OpenCart store.

Secure OpenCart Checkout SSL

Summary

Share this tutorial if it helped you and subscribe to our blog for weekly updates with more helpful guides like this one.

Join 11,000+ subscribers receiving actionable E-commerce advice

* Unsubscribe any time

Trending blogs

comments powered by Disqus