Once SSL is installed on your dedicated server (as explained here) for the domain name you have selected, you will need to redirect all non-secure http links to secure https connection.
For any website to work over SSL, there are some modifications you will need to make to your .htaccess file, and then it will redirect your visitors to the HTTPS version of your website.
Login to your SANGKRIT.net account and follow the given steps:
- Go to your SANGKRIT.net product page.
- Under the Server, click Manage for cPanel
- In the Account Dashboard, click File Manager.
- In the cPanel File Manager, click Settings.
- Make sure that Show Hidden Files (dotfiles) is checked, and click Save.
- Click on public_html, and open your
.htaccess
if you already have one. If not, click File+, name the file.htaccess
and click Create New File. - Select the
.htaccess
file, and click Edit.- If you just created your
.htaccess
file, use this code:
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{HTTP_HOST} ^(www\.)?coolexample\.com RewriteRule ^(.*)$ https://www.coolexample.com/$1 [R,L] - If your
.htaccess
file already exists, insert the lines that begin withReWriteCond
andRewriteRule
directly after the already existingReWriteEngine On
. - Click Save Changes and Close.
- If you just created your
That’s it. Visit your website and you’ll be re-directed to the HTTPS version.
If you use WordPress, then follow these steps:
- Log into your WordPress Dashboard.
- Visit Settings, click General.
- Locate the following fields:
- WordPress Address (URL)
- Site Address (URL)
- In each field, update your URLs from http to https
- Scroll down and click Save Changes.
- Open your current
.htaccess
file in the/public_html/
folder with the cPanel file manager for editing. If you don’t already have a.htaccess
file, you’ll need to create one. - Insert the following code at the top of your
.htaccess
file: - Click Save Changes at the top-right corner of the screen.
In some cases you will need to edit your .htaccess file, if you don’t want that then you may also use a WordPress plugin such as Really Simple SSL It saves you from following so many technical steps.