Get your FREE copy of "The Ultimate Guide of SSL"

Download Ebook

How to Install an SSL/TLS Certificate on Drupal?

Millions of websites, including large and small websites consider using one of the most powerful content management systems, Drupal. It’s a highly scalable and ultra-fast open-source platform, used by many high profile sites such as the Australian Government, The White House, and NBC to deliver and manage online content.
Still, securing data stored, transferred on any website or securing a site from Google penalty, requires a reputed SSL/TLS Certificate installed on it. No matter, whether it’s using the popular CMS like Drupal or not.

Here’s Guide to Install an SSL/TLS Certificate on Drupal

After you purchased an SSL/TLS Certificate and get your Server Certificate, Intermediate Certificate, and Private Key in place, it’s time to get into the nitty-gritty of its installation process.

In case you’re wondering what the server and intermediate certificates and private keys are-

  • Server Certificate: It’s the certificate you will get from the CA for the domain. It’s usually sent through email or you can even download it by visiting your account’s dashboard by clicking on the order.
  • Intermediate Certificate: Often referred to as the CA Bundle, an Intermediate certificate is a subordinate certificate issued by the trusted root for issuing end-entity server certificates.
  • Private Key: It’s a cryptographic key that is obtained by the recipient of an SSL/TLS Certificate. It’s a file that must be on your server or with you if you’ve generated the CSR.

SSL Installation Steps for Drupal

1. Configure a Server

As Drupal is a Content Management System (CMS), your server must be configured first.

Steps to Configure Your Server

  • Go to the admin login page and log-in to it.
  • If your organization has more than one Drupal website, select the one that you want to secure with HTTPS. On the control panel page, click the File manager button and navigate to the webRoot directory for the domain name of the company. Now, click go or open to create a new tab.
  • Select New File or Addfile from the File Manager main menu and create a new file named as .htaccess. Mostly, this file will be automatically generated by the file manager after you click the Create New File button and it’ll display it in the list of your files and folders on the webserver.

Once you finish creating .htaccess file, move on to the below steps.

2. Enabling SSL

Drupal is one of the CMSs designed in a way to recognize SSLs automatically. So, once your SSL/TLS certificate is installed, it becomes quite easy to access the Drupal website on HTTPS protocol. However, the .htaccess file of the site needs to be edited first.

Steps to Edit .htaccess File

  • On your cPanel, go to File Manager
  • The File Manager pop up will open. Select Home Directory and click on the checkbox Show Hidden Files (dotfiles).
  • Now, locate the .htaccess file in the folder where you installed Drupal and edit it. You’ll have different options to edit it. For instance, command-line text editor. Here, we are using the editor of the cPanel File Manager. Click the edit button at the top bar.
  • In the .htaccess file, find: RewriteEngine and paste the following command below that:

RewritreCond%{HTTPS} off
RewriteCond%{HTTPS_HOST} !^www\.

  • Once you add the above command and save the .htaccess file, HTTPS will be enabled onto your Drupal website.

3. Verify Installed SSL/TLS Certificate

  • Once you edit the .htaccess file, exit from the File Manager and log out from your web hosting cPanel. Now, go to Drupal’s admin page and log in as the admin.
  • On the admin toolbar, locate Select Site > Global Configuration > System
  • Beside the “use Apache mod rewrite” option, select YES. At the top of the menu, click the “save” button and exit the administrator section of the website.
  • Finally, check whether you followed all the steps correctly. To checkt, enter your company’s Drupal website in the browser’s address bar and hit enter. Whether you enter or, the edited .htaccess file will redirect to the HTTPS (SSL) version of the site.

Related Articles:

Disclosure: AboutSSL appreciates your continuous support. It helps us tremendously to keep moving in the competitive SSL industry. Here most of the links which direct you to buy any SSL/TLS related service or products earns us a certain percentage of referral commission. Learn More