Redirect entire website to HTTPS (SSL) from HTTP with htaccess

If you have recently purchased an SSL Certificate and would like to redirect your website to load with the SSL Certificate and are not sure how then this is what you need to do. The process is fairly straight forward and it should work on Apache and most NGINX based servers without any issue.

  1. Login via FTP, SSH or in to the file manager within your hosting control panel in to your hosting account/domain.
  2. You then will need to go to your public_html folder or httpdocs folder. Locate the file called ".htaccess". If you cannot see it make sure you have enabled the option "show hidden files" otherwise you will not see it.
  3. Open up the .htaccess file and add the following code under the line that says "RewriteEngine On":

    RewriteCond %{HTTP_HOST} ^yourdomainname.com.au [NC]
    RewriteRule ^(.*)$ https://www.yourdomainname.com.au/$1 [L,R=301]

  4. Save this change and then try visiting your website. When you visit the site it should automatically redirect after a few seconds to https. If it fails and/or you have no luck, submit a ticket to us and we can investigate the issue further for you.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Do you Sell SSL Certificates? If so, What SSL Certificates can I buy?

We can help you with SSL's ranging from AutoSSL/Lets Encrypt SSL's right through to Extended...

How long does it take to get a SSL Certificate?

In the perfect situation, SSL Certificates can be purchased, setup and installed on a site within...