How to install a free SSL certificate on Opencart Let’s Encrypt™

The SSL certificate is needed to encrypt all communication between the browser and the server, which ensures that all communication and data goes through a secure (HTTPS) connection.

Is the SSL certificate required on Opencart?

SSL certificate is required on OpenCart as it shows reliability and security to customer/visitors and gain your clients’ trust and somewhat helps to increase your website’s search engines ranking.

Which are the pages that we have to make SSL in the e-commerce site?

SSL should be activated everywhere, but important where sensitive data are to be transferred from user to server. My account, Login and checkout URL should be on SSL. But whoever is providing the SSL certificate they provide for the whole domain so just install throughout the domain.

Server settings for the Encrypts SSL

Login to your Cpanel and check the section Security

Cpanel Security Section

Click the “Lets Encrypt™ SSL“.

Let's Encrypt certificates

Click +Issue. SSL is installed on the domain.

Installation of SSL certificate

You can verify by going to the Security section of the dashboard and click “SSL/TLS Status” check if “AutoSSL Domain Validated” is showing for each domain.

Auto SSL domain validated

If you don’t see it then go to Security section of the dashboard and click “SSL/TLS”

Installed SSL websites

Then click on the “Browse Certificates” and select your certificate and install click install at the end.

Now your server is ready now need to do some setting change in the admin dashboard.

Three points to do for activation of the SSL certificate or digital certificate are below for OpenCart:

  • Enable SSL in System->Settings->Edit->Server->Use SSL and select Yes.
digital certificate for Opencart
  • Check if there is https in /config.php and /admin/config.php
  • Change the .htaccess in your Apache server like below:
RewriteCond %{HTTP_HOST} ^webocreation\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]

Replace with your site URL in the above code. It redirects all non-https to https URL, likewise, it will redirects www URLs to non-www URL if you want the www then add www at the last line.

If you encounter an SSL problem with opencart follow these steps to solve it.

1. Make sure you update both config files with “https”
2. Make sure you turn ON SSL under backend – system>settings>edit>server
3. If you are using Plesk make sure you check the box for domain settings that says “Use a single directory for housing SSL and non-SSL content”

How we can know that there is a problem in the Opencart installation of SSL?

Put up a simple index.html test file and then access it via if you get an error there it has nothing to do with opencart. If you don’t then opencart should work.

If you found this error “SSL_ERROR_TX_RECORD_TOO_LONG”
-Then it means that the SSL was not installed on your host properly.

Stop Google from indexing all of your SSL pages

First, make 1 robots.txt file and 1 robots_ssl.txt file. You could put anything in them, but the default would be something like this:

In robots.txt

User-agent: *
Allow: /

In robots_ssl.txt:

User-agent: *
Disallow: /

Then, in your .htaccess file, add this

RewriteEngine on
Options +FollowSymlinks
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^robots.txt$ robots_ssl.txt

If you’re using the .htaccess that comes with OpenCart then the first two lines are already added in the .htaccess file for you, you would just add in the RewriteCond and RewriteRule lines.

We hope this helps someone to set up SSL properly and easily in Opencart. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our twitter account @rupaknpl and subscribe to our YouTube channel for opencart tutorials.

Previous articleMarketo API – export all Forms and their Fields from our Marketo database
Next articleHow to add default or custom OpenCart modules in the Journal theme?


  1. no one knows how and where to place the trust logo in opencart
    I’ve tried all the old tpl files but no luck with these new Twig files please help if you can.


Please enter your comment!
Please enter your name here