Force my website to use SSL (not WordPress)

Share on facebook
Share on twitter
Share on linkedin

Copy this code into your htaccess file. Then replace the yourdomain.com.au with your website domain name. You only need to use this code if your are not using a CMS like WordPress. It works well for basic HTML websites for example.

—————————–
RewriteOptions inherit
RewriteEngine on

# If the hostname is NOT yourdomain.com.au
RewriteCond %{HTTP_HOST} !^yourdomain\.com\.au [OR]
# Or if non SSL request
RewriteCond %{HTTPS} !=on
# 301 redirect to the same resource on yourdomain.com.au
RewriteRule (.*) https://yourdomain.com.au%{REQUEST_URI} [L,R=301]
——————————

Is SSL installed on my domain

You need to visit your website by typing https://yourdomain.com.au into your web browser. Don’t forget to add the “s” to the http part, that is

Installing SSL on my domain

For SSL to be successfully install on your domain, your domain must be pointing to our web hosting servers. This is so the SSL provider