Forcing HTTPS

Once an SSL Certificate has been successfully installed on your website, and you can visit https://yourdomain.ca and have your website content displayed as intended, the final step will be in implement a redirect so that any future visitors to http://yourdomain.ca will be redirected to https://yourdomain.ca

Via Plesk Control Panel

The easiest way to implement a HTTP to HTTPS redirect is via the Plesk Control Panel. You will first need a valid and functioning SSL certificate installed on your website, as mentioned above. The redirect is then implemented via the following steps:

  1. Log into your Webnames account at https://webnames.ca
  2. Browse to Account > Web Hosting
  3. Click on your domain name
  4. Click on the Hosting Tab
  5. Under the Hosting Logins heading, click on Login for the Hosting Control Panel
  6. Once logged in, click on Websites & Domains
  7. Choose the domain to configure and click Hosting Settings
  8. Select both SSL/TLS support and Permanent SEO-safe 301 redirect from HTTP to HTTPS checkboxes under Security
  9. Select the corresponding SSL certificate from the Certificate drop-down list
  10. Confirm changes by clicking OK button

Your site will now utilize a secure connection for all web page requests, and any requests for http://yourdomain.ca will be forwarded to https://yourdomain.ca (as will all sub domains (e.g. www) and subfolders.

Via .htaccess file

As an alternative to using the Plesk COntrol Panel to implement a redirect, the .htaccess file within your hosting account can also be edited directly. Your .htaccess file is a configuration file used by the web server software to provide a way to make configuration changes on a per-directory basis.

  1. Log into your Webnames account at https://webnames.ca
  2. Browse to Account > Web Hosting
  3. Click on your domain name
  4. Click on the Hosting Tab
  5. Under the Hosting Logins heading, click on Login for the Hosting Control Panel
  6. Once logged in, click on Websites & Domains
  7. Choose the domain to configure and click File Manager
  8. In the list of files present in your hosting, locate and click on the file named .htaccess

Redirecting HTTP to HTTPS

Redirect All Web Traffic

At the top of your .htaccess file , add the following text and then save:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.ca/$1 [R,L]
Redirect a Specific Domain Only

To redirect a specific domain to use HTTPS, add the following text and then save:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.ca [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.ca/$1 [R,L]
Redirect a Specific Folder Only

To redirect HTTP to HTTPS for a particular folder only, add the following text and then save:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} yourfolder
RewriteRule ^(.*)$ https://www.yourdomain.ca/youfolder/$1 [R,L]