Having SSL Certificate for your site is a must. SSL certificates not only help in making the web more secure and encrypted but also indicate a trust level to the audience that is visiting your website.
With latest cPanel updates, now you get an option to add SSL Certificates right from your cPanel screen. So you don’t need to visit any third party sites like SSLForFree.com and then manually adding files to cPanel.
So without further ado, here’s how:
1. Installing SSL Certificate using cPanel
-
- Login to cPanel ( usual cPanel url would be yourwebsitedomain.com/cpanel or cpanel.yourwebsitedomain.com )
- Once logged in, check for Lets EncryptTM SSL Option
- Under issue a certificate, right next to domain name, Click on Issue icon
- On next tab, Click on Issue button to install SSL automatically or if you want to test then click on Issue(Dry run). Wildcard option here would be used in case you are having subdomain(s) and want to extend the certificate to the same.
2. Checking if both http & https versions are working fine
Next step is checking if everything is working fine by visiting both http & https version of site. For this, first visit site like your normally do. Second time around, add https:// before your site domainname. So if its mohandhanwani.com then we’ll type it as http://35.197.110.238
Confirm that both the versions are working fine.
3. Editing HTTP to HTTPs in Database Part I
Now if you are using WordPress, simple follow these steps:
- Open WordPress Dashboard
- Click on Settings > General
- Edit Site URL(s) from http:// to https:// e.g. if url(s) are http://mohandhanwani.com then edit those to http://35.197.110.238
4. Check if everything is working fine Part II
After editing the WordPress url, check if your website is working fine e.g homepage & if there is any styling issue(s) and things like that. If you are getting any styling issues, those would usually be from http links to stylesheets or jquery files in code. As these days browsers usually don’t fetch data from http links when whole site is in https (As they prefer full encryption if there is any encryption on site).
In that case I would recommend using Real Simple SSL plugin as that would replace those http to https automatically without you needing to worry about anything.
Still if you are a Manual guy, then open the Google Developer tools, and find out which files are not loading properly and location of those files. Then edit those links to https://
After this check if all navigation links etc. are using https:// version.
5. Force HTTPs Redirection
If you have installed SSL Plugins e.g. Real Simple SSL, then those would do it for you. You would just need to click force HTTP in settings of that plugin. You can force SSL Redirection via .htaccess file or via cPanel as well. And here’s how:
Via .htaccess file :
There are various ways to edit .htaccess file. And before editing the file, take Backup. So if anything goes wrong you can switch it back to previous version. These ways to edit include, via FTP, via Yoast Tools Option, or any .htaccess file editor plugin.
So not matter using with option you edit, we simply would add following code to file:
RewriteEngine On
RewriteCond {086092ef17e3487c0232d5be36a622d732b885ddcdbdcebe9aea32d40e8ce56b}{HTTPS} off
RewriteRule ^(.*)$ https://{086092ef17e3487c0232d5be36a622d732b885ddcdbdcebe9aea32d40e8ce56b}{HTTP_HOST}{086092ef17e3487c0232d5be36a622d732b885ddcdbdcebe9aea32d40e8ce56b}{REQUEST_URI} [L,R=301]
Via cPanel:
For HTTPS Redirection via cPanel, follow the below steps:
- Login to cPanel
- Click on Domains options under Domain section (which would list the domains)
- Check for option Force HTTPs Redirect and toggle ON the option & Done
6. Test SSL:
Now check if everything is working fine.
Manual Way of Installing SSL via cPanel
If you don’t see the Lets EncryptTM SSL option in your cPanel. Then try updating it to latest version. Or if you are using Free Hosting/On GoDaddy Hosting and not willing to pay extra for SSL then check out this video on Manual Installation instructions :