There are upcoming maintenance events which may impact our services. Learn more

How to force your site to use SSL (https) using cPanel Print

  • ssl, cloudns
  • 1

Once your certificate is installed, you will need to redirect from ‘http://’ to ‘https://’ – this can be achieved in a number of ways…

Using our CloudNS plugin

From within cPanel, go to…

  1. Nginx Automation-> CLOUDNS
  2. Next, select the domain the list and click ‘Configure’
  3. Click ‘Redirections’
  4. ‘Enable’ the redirect_to_ssl option
  5. Click ‘Apply Settings’

That’s it! You are done – now, your site will be forcing the https:// protocol instead of using http://

Force https:// via a .htaccess file

To force all web traffic to use HTTPS insert the following lines of code in the .htaccess file in your website’s root folder. Important: If you have existing code in your .htacess, add this above where there are already rules with a similar starting prefix.

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$$1 [R,L]

Be sure to replace with your actual domain name. To force a specific domain to use HTTPS, use the following lines of code in the .htaccess file in your website’s root folder:

RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$$1 [R,L]

Make sure to replace with the domain name you’re trying force to https. Additionally, you need to replace with your actual domain name. If you want to force SSL on a specific folder you can insert the code below into a .htaccess file placed in that specific folder:

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} folder RewriteRule ^(.*)$$1 [R,L]

Make sure you change the folder reference to the actual folder name. Then be sure to replace your actual domain name and folder you want to force the SSL on.

Force https:// using a WordPress plugin

There are tons of plugins available for this purpose, however, the one we recommend is called ‘Really Simple SSL’ – this can be downloaded in WordPress via the Plugins section of your Dashboard. One thing you will need to also do when setting https:// for your WordPress site is to ensure your ‘Site URL’ in Settings -> General also have ‘https://’ in.

Was this answer helpful?

« Back
Login Sign Up