This article describes how to enable SSL for a Drupal site.
You can use .htaccess settings to automatically redirect users to secure (https://) web site connections, even if they type a non-secure URL (http://) in their web browser.
Additionally, you can use .htaccess settings to automatically redirect users who do not include the www prefix. For example, many third-party SSL certificates are only valid for one specific domain, so web site owners often set up an SSL certificate for the www subdomain (www.example.com). However, this means that visitors to the site may receive a security warning if they go to example.com without the www prefix. An .htaccess directive enables you to prevent this from occurring.
To configure these settings, follow these steps:
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]
Test the new configuration. Using the Apache directives listed in step 2, the following should happen:
Using an SSL certificate from a recognized Certificate Authority is recommended for the best results when enabling SSL for Drupal. cPanel SSL is a free, automated, and open certificate authority and is recognized by most modern browsers. cPanel SSL is supported for all new A2 Hosting accounts and certificates can be generated automatically for immediate use. For more information about cPanel SSL, please see the Related Articles section.
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.