Quick Tip: Prestashop SSL (and Some Troubleshooting)

Some people seem to have trouble in enabling SSL in Prestashop, especially when they have custom themes. Let’s see how to do it properly, and eventually debug a couple of errors.

Some words about SSL

If you don’t know what SSL is, or have heard about but dontr grasp the concept, here it is: SSL is a cryptographic protocol that basically secures data sent across pages with a cryptographic key. It’s basically used to secure credit card transactions, and sensible data like login details, or personal information. In Prestashop, the back office login, front office account pages and orders can be secured with SSL by default. Of course, you can secure other pages if you want, but this is beyond the scope of the quick tip.

Get your certificate first!

Before even thinking on implementing SSL in Prestashop, you must buy an SSL Certificate. It doesn’t come for free in any hosting plan I know, and it has to be bought separately for each domain. This means that if you have myshoes.com, and myshoes.net, 2 SSL Certificates will be needed. Most hosting providers also require you to buy an additional dedicated IP address. Let’s see how to buy an SSL Certificate with a popular and affordable hosting: Arvixe.com.

Setting up an SSL Certificate with Arvixe

I’m using Arvixe, but most of the providers offer about the same way to get an SSL certificate. I’ll also assume your already have a domain, without the SSL Certificate.

First, login to your Arvixe account, and navigate to the Support Center. In the knowledgebase section, you’ll find a link for SSL, with any additional information you may need. You can ask the certificate in many ways: using the live chat (just below Knowledgebase), sending an email at ssl@arvixe.com, or opening a ticket. The important thing is that you provide the following information:

  • Arvixe Username
  • Host to make cert for: (usually domain.com or www.domain.com)
  • City:
  • State:
  • Country (2 letter abbreviation):
  • Company Name:
  • Company Division:

As they state in the knowledgebase, if you already have your own certificate, they’ll install that for FREE.

As for their pricing, the SSL itself is $25.95/year, plus 2 additional bucks per month for the dedicated IP.

Check that the certificate is working

After some time (usually, a couple of days) you’ll receive confirmation of the successful installation of your certificate. It’s time to test it out. Login to your Prestashop admin panel, and navigate to Preferences -> General.. The very first option will allow you to test out your new SSL certificate:

Prestashop SSL settings page

Click on Please click here to use HTTPS protocol before enabling SSL.
If everything works out correctly, after the page refreshes your address bar will have https:// at the beginning, with a padlock right in front:

Prestashop SSL activated, https is now visible

If, for some reason, you can’t access the page (Internal Server Error 500, 404 not found, 102 (net::ERR_CONNECTION_REFUSED) or anything else) your SSL certificate is not setup correctly. If this happens contact your hosting immediately, since you can’t do anything about it.

Else, if you can display the new page, set Enable SSL to yes, and save.

Troubleshooting

At this point, your content should be secured. Access an account page, and try placing an order in your Prestashop front-office. You should get the https:// prefix for the url.

But this might not happen at times, even though the secure link was okay for your admin page. If you get some new 404, 500, or 102 errors, the only option is to contact the hosting. Let them also know if you use Pretty URLs, as this might conflict at times. A bunch of other issues can be solved anyway.

The page at http://mysitesname.com ran insecure content from http://anotherpage.com/file.ext

This usually happens if some files required in the page are not properly embedded. Most of the times, when you use a custom theme. If you run into this, take note of the file that is being embedded and try to locate it in the html structure. It usually is a javascript, stylesheet of image type file. If you use add this, for example, you’ll need to include a secured version of their javascript to avoid this error.
If your theme has a slider, you will need to change the prefix for those.

In all cases, when you use SSL, your image/stylesheets/javascripts references MUST begin with {$base_dir_ssl}.

I can’t access my site (back nor front office) anymore!

Your server’s SSL settings might be wrong. In this case, you must force Prestashop not to use SSL. Login to your phpMyAdmin (or any other database manager). Access the configuration table, and locate PS_SSL_ENABLED. It should be set to 1, crush it to zero. This way, you’ll be able to access your site again, but of course you’ll have no SSL. Be sure you further investigate the issue, before trying to turn it on again!

Looking for quality Prestashop Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under PrestaShop | RSS 2.0

Author Spotlight

Fabio Porta

Fabio Porta

Fabio has been involved in web development and design since 2005, when launched his first website at the age of 16. He’s now highly skilled in both client and server side development, along with design, and since August 2012 runs a successful website about PrestaShop tutorials and Prestashop Modules called Nemo’s Post Scriptum, at http://nemops.com

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 3 = 12

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>