Using SSL on your Drupal website

Using SSL on your Drupal website

In this post I will explain how you can install a SSL certificate on your shared hosting using Let's Encrypt. By doing this we increase trust, integrity of data and even optimize your SEO.

Install the certificate on your server

My personal website is hosted on a shared hosting on Neostrada (Dutch hosting company).

It comes with Cpanel and Let's encrypt for Cpanel pre-installed. This enables us to install a free SSL certificate.

The first step is to login to your Cpanel:

Cpanel Security tab
Under the Cpanel Security tab you click "Let's encrypt for Cpanel"

The next step is to issue your certificates:

Issue SSL certificate
Issue one or multiple certificates for your domain(s), the installation of the certificates will go automatically

If everything went fine you'll see a list of issued certificates now, the certificates are automatically renewed so you won't have to do anything in the future to keep them active.

SSL certificate overview
SSL certificate overview

Force the usage of https on your Drupal website

Force the usage of https:// in your website urls by adding the following to your .htaccess file:
Make sure you replace the website url before saving.

# Force SSL 
RewriteCond %{HTTPS} off [OR] 
RewriteCond %{HTTP_HOST} ^www.drupedia\.org* 
RewriteRule ^(.*)$$1 [L,R=301]

Congratulations, your website is now using SSL. This means all communication is secure which should increase your customers' trust.