Set Website default to HTTPS

How to set your website so that if someone just types "" they will get ""

(Note: this of course will only work if you have an SSL key installed on your account)

This change will be made via your htaccess file.

To get to this file ether Login to cPanel or connect via FTP

Go to Files Manager
Navigate to Public HTML
look for htaccess, right-click and select edit.

Navigate to Public HTML
look for htaccess and download to edit.

Add the following to your htaccess file, usually at the top:

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteCond %{HTTP_HOST} ^(www\.)?example\.com

RewriteRule ^(.*)$$1 [R,L]

Replace "example\.com" and "" with your domain name.

Save the file

You can test by typing your website name without "https://" and make sure it rewrites.
  • 0 Users Found This Useful
Was this answer helpful?