Knowledgebase

How do I force SSL/HTTPS on my websites?

The following rules can be added to your sites .htaccess file to force visitors to use SSL/HTTPS when visiting your website.

To force SSL on all websites located under your .htaccess, add this rule:

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

To force SSL on a single/specific website and not all websites, add this rule:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [OR,NC]
RewriteCond %{HTTP_HOST} ^www\.domain\.com [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

In the above example you would replace "domain.com" with your specific domain name.

Please note that in order for SSL/HTTPS to work you must first have an SSL certificate install on your site. We offer free SSL certificates through Let's Encrypt. Instructions on how to install your free SSL certificates can be found here: How to install your free Let's Encrypt SSL Certificates
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Accessing SpamExperts and creating separate SpamExperts users

All cloud web hosting, semi-dedicated, and reseller hosting services include enterprise level...

Adding an IP or port to a whitelist

Our default firewall rules allow most applications/software to run without issues on our shared,...

Adding or Editing your DNS Zone Records (A,AAAA,CAA,CNAME,DMARC,M...

Any website hosted through Hawk Host which is using Hawk Host's nameservers (nsX.hawkhost.com)...

Cloudflare cPanel Deprecation Notice June 15 2022

Unfortunately Cloudflare has formally announced the deprecation of their cPanel plugin, as a...

cPanel "Email Deliverability" interface shows PTR/rDNS error

When checking the "Email Deliverability" interface in cPanel it may show a PTR/rDNS error which...