Force SSL with .htaccess Print

  • 0

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://.


Was this answer helpful?

« Back