How do I force HTTPS for my website so it uses my SSL certificate

If you have purchased an SSL certificate and you want to start using it you will need to configure your domain name to use HTTPS (secure) rather than HTTP (non secure). Most websites built with a CMS will allow this to be configured or enable this by default but for other types of website you may need to force HTTPS . To do this you may need to create a HTACCESS file and upload this to your web root folder.

Open notepad or your preferred text editor and in a new screen copy and paste the following code.

####### Redirect to https ##################################
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
######################################################

Remember to change yourdomain.com to the domain name of your website.

Save this to your local disk as htaccess.txt and upload this file to the web root of your website using your preferredĀ  FTP client or via your hosting panel > file upload.

Rename this file to .htaccess and make sure it has permissions set to 644

If you already have a .htaccess file you can copy and paste the code and append it to the top of this file and save it .

  • https, ssl, secure
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How Do I Upload Files Via FTP

First you need to get an FTP client. There are lots of free clients on the web. Once you've...

I have a website, where/how do I upload my website files?

If you have created a website and wish to upload it to your webspace, you must upload it into...

How to redirect your site using htaccess

It is sometimes necessary to redirect an entire domain to another destination domain . This can...

Installing Wordpress or an application from the Application Vault returns an error.

You might find when installing an application from the Application Vault for example Wordpress,...

Migrate Wordpress to a new domain name

Changing Your WordPress Domain Name While Moving Your Site to a New Location There are different...