You should make sure you have a SSL certificate installed for your domain. If you do not have a dedicated SSL installed, this configuration will cause issues with accessing your OpenCart dashboard and the login/checkout pages of your store.

Most payment processors such as Authorize.net will require you to purchase a SSL. You may want to purchase and install one prior to fully setting up your shopping cart.

Please see our tutorials if you need more information on what a SSL is and how to purchase one. Please keep in mind OpenCart does not support the use of the shared SSL certificate.

To enable SSL in OpenCart, there are three areas to edit: The System Settings in the OpenCart Dashboard, the config.php file in the directory where you installed OpenCart, and the config.php file in your OpenCart Admin folder.

Enabling SSL in the OpenCart Dashboard

  1. Log into the OpenCart Dashboard
  2. Go to System > Settings
  3. Click on the Server tab
  4. Check the radio button to use SSL

Enabling SSL in the OpenCart directory config.php file

  1. Log into cPanel and go to File Manager
  2. Navigate to your OpenCart installation directory
  3. Open (Edit or Code Editor) the configuration file (config.php)
  4. Look for the lines below // HTTPS that looks similar to this:

    define('HTTPS_SERVER', 'http://opencart.inmotiontesting.com/');
    define('HTTPS_IMAGE', 'http://opencart.inmotiontesting.com/image/');

  5. Edit the HTTPS settings to reflect your SSL URL path. For example:

    define('HTTPS_SERVER', 'https://opencart.inmotiontesting.com/');
    define('HTTPS_IMAGE', 'https://opencart.inmotiontesting.com/image/');

  6. Save changes and close the config.php file

Enabling SSL in the OpenCart Admin folder config.php file

  1. Go to the “Admin” folder
  2. Open (Edit or Code Editor) the configuration file (config.php)
  3. Look for the lines below // HTTPS that looks similar to this:

    define('HTTPS_SERVER', 'http://opencart.inmotiontesting.com/admin/');
    define('HTTPS_CATALOG', 'http://opencart.inmotiontesting.com/');
    define('HTTPS_IMAGE', 'http://opencart.inmotiontesting.com/image/');

  4. Edit the HTTPS settings to reflect your SSL URL path. For example:

    define('HTTPS_SERVER', 'https://opencart.inmotiontesting.com/admin/');
    define('HTTPS_CATALOG', 'https://opencart.inmotiontesting.com/');
    define('HTTPS_IMAGE', 'https://opencart.inmotiontesting.com/image/');

  5. Save changes and close the config.php file

Now, anytime you login to your dashboard or a visitor purchases a product it will force the SSL for security purposes. If you need further assistance please feel free to ask a question on our support center.

Continued Education in Course 103: Setting up a Payment Gateway
You are viewing Section 3: How to enable SSL connection in OpenCart
Section 2: Setting up Payment Modules in OpenCart
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-04-23 3:07 am

Hello,

Thank you for sharing the detailed steps.

However, ever since my host has installed SSL on the server, except for home page no images are loading on the website..none on category page and none on product page.

 

Furthermore, when i followed your instructions to enable SSL on the website, on checkout page and in admin CSS & JS do not load and no images are getting loaded on the webpage!

 

What could be the problem here?? 

Staff
10,022 Points
2014-04-23 8:11 am
There could be multiple reasons as to why you are seeing this. Could you provide the URL where you are seeing this to investigate?
n/a Points
2014-07-10 7:09 pm

Thank you soooo much for posting this information... I broke my website several times and had to restore it whilst trying to get ssl up and running...  you're my hero !

n/a Points
2014-07-14 10:32 am

Thanks for this!

I have a problem though.  The homepage and non of the category or product pages are pointing to HTTPS, just a few other pages such as account, logic, etc are working.

Staff
10,994 Points
2014-07-14 11:06 am
Hello Mark,

Thank you for your question. After enabling your SSL in the 3 locations, have you tried clearing your browser cache, or testing on a different computer?

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-08-02 1:40 pm

Hi dear, 

I followed all the instruction above but my store front is not pointing to https only my website admin area is pointing to https.

my website is scarletlove.com  please check and help me.

Staff
20,848 Points
2014-08-04 10:20 am
Hello Ashish,

I checked and your site displays fine using the https version. This article describes how to enable it, which it appears you did. It does not, however, force https when the user arrives on the site.

Kindest Regards,
Scott M
n/a Points
2014-09-03 4:36 am

Hi Im trying to get the Facebook store basic module to work and it requires ssl.

ive followed the instructions, no https happens and I cant login to the admin any more if the config.php in the admin folder is set to https://.

www.thesleepingcloud.co.uk

any ideas?

many thanks

Dave :)

Staff
10,994 Points
2014-09-03 12:55 pm
Hello Dave,

Thank you for your question. We are happy to help, but will need some additional information. Did you change the URL in all 3 areas?

When i go to your site, it forces me to go to:
http://thesleepingcloud.co.uk/

This usually means that the url is set as:
http://thesleepingcloud.co.uk/

If you have any further questions, feel free to post them below.

Thank you,
John-paul
n/a Points
2014-09-03 6:27 pm

Hi,

Thanks for sharing this but I'm still experiencing some major issues with my SSL configuration.

Can anyone please get in touch to help me reslove my SSL issues. I configured the SSL and now I've lost images on my homepage and three other pages - also SSL doesn't seem to have worked on everypage! I'm so desperate to reslove this.

Staff
18,399 Points
2014-09-03 6:41 pm
Hello Leo,

Our apologies for the problems you're having with SSL in your OpenCart installation. Unfortunately, the support we provide here is done in replies to posts here within the Support Center. If you wish for us to help you, then please provide specific information on the problem you're having (URL and or steps to duplicate a specific problem) and we can investigate it further.

Lost images are typically the result of broken links. You need to look at the paths for those images and determine WHY they aren't working. SSL is generally based on a particular domain. If you are inspecting to see why a page is not being entirely secured, then it's generally because some link or graphic or element on your website is not using the SSL in the URL.

I hope this helps provide some insight for the issue. Our apologies that we cannot provide private support for the issue. If you are a customer with InMotion Hosting, then you can submit a support ticket or contact our technical support department for support without having to post any information in our support center.

Kindest regards,
Arnel C.
n/a Points
2014-09-06 1:17 pm

What about this case, i have got a working cert for www.example.com , now i want to add opencart to www.example.com/shop , do i need to buy a new certificate ? or it should work with the example.com cert ? so far ssl is on but i get "server address does not match the certificate url.any idea ? thanksKarl

Staff
10,994 Points
2014-09-08 9:16 am
Hello Karl,

Thank you for your SSL question. Since /shop is just a folder (within www.example.com), your SSL will still work for it.

Since the SSL must match the domain exactly, I recommend checking your SSL for spelling mistakes.

You can use a tool such as the SSL Checker to review your SSL information.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2014-11-04 4:57 pm

Thank you very much for this article. I have a problem with open cart. After the implementation of SSL on my website (marceloflondon.com), the add to cart button no longer works, the login (after valid username and password) doesn't do anything, the register field no longer function. What do you think has gone wrong? Helppppp.

Staff
10,022 Points
2014-11-04 5:30 pm
Could you provide me a link to your site so that I may replicate the issue?
n/a Points
2014-12-12 5:12 am

Hello,

I just want to know,How much to buy a SSL from Inmotionhosting?

Of course ,if I buy a Inmotionhosting host.

Best

Staff
10,022 Points
2014-12-12 10:12 am
SSL certificates are currently $99 per year with a one-time $25 installation fee. You can find more information within our article on purchasing an SSL certificate.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

18 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!