Force SSL with .htaccess

The padlock icon in your browser indicates that your site has an SSL certificate, which encrypts communications between visitors and the server. Because Google now displays a warning in the browser for sites without SSL certificates, it is more crucial than ever to have an SSL certificate on your site.

All Listed Hosting-hosted sites/domains are automatically enrolled in the Auto SSL system, which is available free of charge with all our hosting services. This implies that as long as the domain links to us (through nameservers or A records), the system will automatically obtain and install an SSL certificate for the domain if it does not already have one. This procedure is transparent and does not necessitate your involvement. In most cases, the SSL certificate is requested and installed within 4 hours after pointing the nameservers; however, if it takes longer than this or if your SSL certificate is not working, please let us know.

 

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

This will redirect all http:// queries to https://, however you should only do this when your SSL is configured and operational. If you're using a CMS like WordPress, make sure to add the https:// in the Site URL and Homepage fields in the wp-admin section. This is necessary in order for pictures, stylesheets, and other files to be loaded via https://.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Enable an SSL Certificate

You’ve purchased a certificate; now it’s time to make use out of it! Since SSL certificates...

Generating a CSR using cPanel

Please follow the instructions below to generate the CSR code in your cPanel account: 1) Log...

How to install FREE SSL on cPanel

You’ve purchased your hosting; now it’s time to install SSL for FREE! Kindly use the below...

What brand of SSL do you offer?

We use comodo ssl to protect your users with https. Comodo's fully functional digital Free SSL...

WHAT IS AN SSL CERTIFICATE?

An SSL certificate acts as third-party verification for a website’s security. It verifies the...