10%
Discount
on first purchase
valid for all products
Standard Certificate @ $5.99
Wildcard Certificate @ $26.00

How to Install SSL Certificate in Drupal: Complete Installation Guide

More than millions of websites, including small & large websites, make use of the powerful content management system (CMS) named Drupal. It’s a scalable and super-fast open-source platform used by many high-profile websites like the Australian Government, NBC, and the White House for online delivery and management of content. Similarly, securing the website is equally important. Installing an SSL certificate is the first and most crucial step to prevent error messages or site load failures.

This article will give you the steps of installing an SSL certificate on Drupal and what prerequisites you need to take care of.

What Are the Prerequisites to Secure Drupal with SSL?

Before you begin SSL setup for Drupal website, make sure you have a server certificate, intermediate certificate, and private Key in place.

In case you don’t know how to get this server certificate, intermediate certificate, and private Key, read below:

  1. Server Certificate

    It’s the certificate you get from a certificate authority such as Sectigo, Comodo or DigiCert for your domain. You might have received it through an email. However, you can also download it from the Account Dashboard of your SSL Certificate provider by clicking on the order.

  2. Intermediate Certificate

    These are the files that let your devices connect to the server and identify the CA that issued the SSL/TLS certificate. You may receive more than one of such certificates, for instance, a Zip folder. If that’s the case, then it may contain the intermediate certificate, which is also called a CA Bundles. If you haven’t, you’ll be required to download the correct CA Bundle for your SSL certificate.

  3. Private Key

    Private Key is the file that could be on your server or with you if you’ve generated the CSR. Similarly, on some platforms like Microsoft IIS, the private Key is not likely visible to everyone, but the server has a track of it.

Before you get these three certificates, you’ll need to generate a CSR for your website. Here, CSR is a certificate signing request, which is one of the initial steps toward getting or installing SSL certificate on Drupal-based or any website. It’s an encoded text block that includes details of your company and website identity, which is verified by the certificate authority before issuing you the purchased SSL certificate.

It’s important to know the information you give within the CSR must be correct and latest, or there’s a possibility that the CA (Certificate Authority) may reject your CSR (Certificate Signing Request).

  1. Main certificate, which is of .crt extension.
  2. Root & Intermediate Certificate (.ca-bundle file)
  3. Private Key certificate

Here’s the Steps to Install SSL Certificate on Drupal

Follow the below steps and install your SSL certificate on Drupal.

  1. Using SSH, log into the account.
  2. In the Drupal Directory, open the .htaccess file. (You can make use of the command-line text editor for this step.)
  3. Within the .htaccess file, copy and paste the below-mentioned code:

    cPanel htaccess

    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  4. Save the .htaccess file.

Steps to Test the Installed SSL Certificate on Drupal

Now, by the below steps, let’s test the status of the SSL setup for Drupal website.

  1. Close the File Manager.
  2. Log out from your hosting provider’s cPanel.
  3. Login into your admin page of Drupal.
  4. Go to the Select Site > Global Configuration > System from the admin toolbar.
  5. Locate the option “use Apache mod rewrite” and click Yes on it.
  6. Click on the Save button.
  7. Now, in the web browser, open the Drupal website.

If everything is successful, below mentioned event should occur:

For instance, if you type www.drupal-website-example.com or drupal-website-example.com, it’ll be redirected to https://www.drupal-website-example.com.

Read Also: How to Install an SSL Certificate on Heroku Server

Conclusion

We hope this article clears doubts regarding how to install SSL certificate on Drupal. In addition, make sure that you test or check your SSL installation status. To verify whether SSL setup for Drupal website is successful or not, you can make use of SSL testing tools like SSL Checker, as it provides instant detailed reports, including identification of any error or vulnerability if it’s present.

Secure Your Website Instantly!
Protect Website and Web Servers in 3 Simple Steps: Purchase SSL, Create CSR, & Install SSL Certificate
Save Up to
85%
on SSL certificates
About the Author

Meet Solanki

Meet Solanki, an IT maestro with 8+ years of hands-on expertise in the realms of network and server administration. Armed with a Bachelor's degree in Computer Science, Meet takes pride in being more than a tech enthusiast - he ensures that the systems run seamlessly and maintain the highest standards of security. His technical acumen is a testament to his commitment to optimizing system performance and ensuring robust security protocols.

Trusted by Millions

SSL2BUY delivers highly trusted security products from globally reputed top 5 Certificate Authorities. The digital certificates available in our store are trusted by millions – eCommerce, Enterprise, Government, Inc. 500, and more.
PayPal
Verizon
2Checkout
Lenovo
Forbes
Walmart
Dribbble
cPanel
Toyota
Pearson
The Guardian
SpaceX