Using SSL on your Drupal website

Increasing trust, integrity of data and even optimize your SEO

This blog post will explain how you can install a SSL certificate on your shared hosting using Let's Encrypt.

Install a SSL certificate on your server

My 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 SSL 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 SSL certificates now, the certificates are automatically renewed so you won't have to do anything in the future to keep them active.

SSL certificate overiew
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:

# Force SSL 

RewriteCond %{HTTPS} off [OR] 

RewriteCond %{HTTP_HOST} ^www.fonsvandamme\.be* 

RewriteRule ^(.*)$$1 [L,R=301]

Make sure you replace the website url before saving.

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


Meer leesvoer

I have been working on a Drupal 8 multisite and at some point I had to set up a new site in the structure. The...
In this blog post you will learn how to add a theme field preprocess function in your theme.
In this blog post I show you how to login and logout from a Drupal 8 Back-end from an Ionic app
It's quite easy to create a node with REST in Drupal 8, in this blog post I'll show you how to do it.