How to Install a TLS/SSL Certificate In Drupal

The following instructions will guide you through the SSL Certificate installation process on Drupal. If you have more than one server or device, you will need to install the certificate on each server or device you need to secure.

What You'll Need

  1. Your server certificate file
    This is the TrustCor certificate you received for your domain.
  2. Your intermediate certificate(s)
    These files allow the devices connecting to your server to identify TrustCor as the issuing CA. There may be more than one of these certificates. If you downloaded the pem-chain file, it will also contain the Intermediate certificate(s) bundled with your domain's certificate.
  3. Your private key
    This file should be on your server, or in your possession if you generated your CSR from a free generator tool. On certain platforms, such as Microsoft IIS, the private key is not immediately visible to you but the server is keeping track of it.

Installation Instructions

  1. Configure your server
    Drupal is a CMS, not a server. So the first step is to configure your server. Find and edit the .htaccess file.
  2. Add the following directive

    <Directory "/path/to/yoursite">			  	
        AllowOverride All
    <Directory>
    
  3. Redirect all HTTP traffic to HTTPS

    <VirtualHost *:80>
        ServerName example.com
        Redirect "/" https://example.com/
    </VirtualHost>
    <VirtualHost *:443>
        ServerName www.example.com
        # … SSL Configuration Goes Here
    </VirtualHost>
    

Your certificate is now installed. You can navigate to your site in a web browser and view the certificate/site information to verify if HTTPS/SSL is working properly.