InMotion Hosting Support Center

Many people have decided to use the free CloudFlare CDN service with their website. The free option does not allow the use of SSL through CloudFlare. However, there is a workaround that lets you use it with your OpenCart site.

CLoudFlare uses the www subdomain to route through CloudFlare's servers. This allows your site www.example.com to be seen via the cached version oncloudflare as opposed to processing directly from InMotion's servers. However, by setting up the HTTPS configuration to use the NON-www version of your site for SSL (example.com) then the visitor will be routed past the CloudFlare servers directly to the InMotion servers.

This change will need to be made by editing the config.php file for your OpenCart. Below are the step by step instructions.

  1. Log into your cPanel dashboard.
  2. Using the File Manager, navigate to the root folder for your OpenCart.
  3. Open the config.php file for editing.
  4. Ensure the HTTP and HTTPS settings are set up similar to the code listed below. Make sure you replace example.com with your own domain name.
    // HTTP
    define('HTTP_SERVER', 'http://www.example.com');
    
    // HTTPS
    define('HTTPS_SERVER', 'https://example.com');
      
  5. Save the file by clicking the Save Changes button in the upper right corner.
  6. Staying in the File Manager, navigate to the admin/config.php file.
  7. Open it for editing.
  8. Set the HTTP and HTTPS settings similar to the following, remembering to replace example.com with your own domain name.
  9. // HTTP
    define('HTTP_SERVER', 'http://www.example.com/admin/');
    define('HTTP_CATALOG', 'http://www.example.com/');
    
    // HTTPS
    define('HTTPS_SERVER', 'https://example.com/admin/');
    define('HTTPS_CATALOG', 'https://exmple.com/');
    
    
  10. Click the Save Changes button to save the file.

Now when your site is visited via non-www, it will route through InMotion Hosting's servers and when the regular www version is visited, it will use CloudFlare.

Continued Education in Course OpenCart
You are viewing Section 1: Using Free Cloudflare for SSL on OpenCart 1.5
Section 2: 348: Creating discounts and specials for your products in OpenCart 1.5

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

   
Social Login Joomla

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

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.

0 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!