24/7 U.S. Support – 877-595-4482
From time to time we are asked how you can force your website visitors to view your website over https. For example, if a visitor access http://domain.com, you can force them to https://domain.com so that they are always using the SSL certificate.
Please note, if you use the Premium Website Builder to create your site, please see our article on How to Force your Premium Website Builder site to use SSL.
To force your visitors to use your Shared SSL certificate:
When testing, we were redirecting whhsupport.com to https://secure21.webhostinghub.com/~whhsup5/
You can see below how the rewrite was setup before we clicked "Add"
When you save this redirect, cPanel actually sets up the redirect by editing your .htaccess file. You don't need to do anything further from here (other than test). If you were actually looking for the .htaccess code to perform this type of redirect, cPanel added the following code to the .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^whhsupport.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.whhsupport.com$
RewriteRule ^(.*)$ "https\:\/\/secure21\.webhostinghub\.com\/\~whhsup5\/$1" [R=301,L]
If you try to setup a Dedicated SSL redirect using the same steps above, cPanel will fail with an error message, similar to:
Redirecting to https://www.whhsupport.com/ will cause a redirection loop because 'http://whhsupport.com/'
which is located at /home/whhsup5/public_html/
is above 'https://www.whhsupport.com/'
which is located at /home/whhsup5/public_html/
Because of this, we'll need to edit the .htaccess file manually. Using File Manager (or your editor of choice), edit public_html/.htaccess and add the following code:
Be sure to replace www.domain.com with your actual domain name. For example, if your domain name is whhsupport.com and you want to force redirection to https://www.whhsupport.com
| Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
|---|---|---|---|
| Call: |
877-595-4HUB (4482) 757-416-6627 (Intl.) |
Chat: | Click To Chat Now |
Copyright © 2013 Web Hosting Hub - Privacy Policy - Terms of Service