Table of Contents
How to Enable SSL in OpenCart: #
Obtain and Install an SSL Certificate: #
Purchase an SSL certificate from a certificate authority (CA) or obtain a free certificate from Let’s Encrypt.
Follow the instructions provided by the CA to install the SSL certificate on your server.
Update Store Settings in OpenCart Admin: #
- Log in to your OpenCart Admin Dashboard.
- Navigate to System > Settings.
- Click the Edit button for your store.
- Go to the Server tab.
- Set the Use SSL option to Yes.
- Enter your SSL URL in the SSL URL field.
- Save the changes.
With your Opencart admin panel, go to System -> Settings. #
Click on Edit button. #
Select Server tab than Find Security tab and select Yes from Use SSL radio button option. #
Configure .htaccess for SSL Redirect: #
- Open the root directory of your OpenCart installation.
- Edit the .htaccess file.
- Add the following lines to redirect HTTP traffic to HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- Save the changes.