Securing your Drupal site with SSL (Secure Sockets Layer) ensures that all data exchanged between your visitors and your site is encrypted. On ruachost.com, you can enable SSL for Drupal using either a purchased certificate or the free cPanel SSL option.
Why Enable SSL?
-
Protects sensitive information such as login credentials and payment details.
-
Improves visitor trust with the padlock icon in browsers.
-
Boosts SEO rankings (Google favors HTTPS sites).
-
Prevents “Not Secure” warnings in modern browsers.
Steps to Enable SSL for Drupal
Step 1: Install an SSL Certificate
-
Purchase an SSL certificate from Ruachost or use the free cPanel SSL option.
-
Once installed, verify that your domain resolves correctly with
https://.
Step 2: Configure .htaccess for HTTPS Redirects
-
Log in to your hosting account via SSH or use the File Manager in cPanel.
-
Open the
.htaccessfile in your Drupal root directory. -
Add the following directives:
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]-
This forces all traffic to use HTTPS.
-
It also ensures visitors are redirected to the www version of your domain if required.
-
Step 3: Test Your Configuration
-
Visit your site using
http://example.com. -
You should be redirected automatically to
https://www.example.com. -
Confirm that no browser warnings appear.
Step 4: Use cPanel SSL with Drupal
-
Ruachost provides cPanel SSL, a free automated certificate authority recognized by most browsers.
-
Certificates are generated automatically for new accounts and can be used immediately.
-
This option is ideal for quick and secure deployment.
Important Notes
-
Ensure your SSL certificate matches your domain (with or without
www). -
If you don’t want to force
www, remove the first two lines in the.htaccessexample. -
Always back up your
.htaccessfile before making changes.