Enable SSL to cPanel Hosting Website Easily

When you entered a particular website, you can view the URL of the website with HTTP or HTTPS. HTTP and HTTPS are both protocols used to share websites or web documents with the world through an internet connection.

we may say without those protocols the internet is nothing. So let us come to the main point when you visit the website through the browser are you regularly using a browser that sometimes can give indication warning messages at the top of the URL nearby the domain that warning messages like triangle message which means that you have visited website is not secure and there should not enter sensitive information in this website like debit card, credit card and photos to that website. if you see HTTPS means the website is a secured connection and can perform any sensitive operations on that website. HTTPS handles all the sensitive information in an encrypted format so hackers can not hack the website easily. Installing an SSL Certificate can enable HTTPS on the website.

ssl for cpenel
ssl for cpanel

What is SSL?

The SSL stands for Secure Socket Layer which is handling the security-related operation as encrypted data. To make a website or blogger a secure connection, you need to install an SSL Certificate on your website. Here we are going to show you guys how you can get an SSL certificate for your website for absolutely free an SSL certificate shows the green padlock and enables HTTPS on your website and if you click on it it says your connection to this site is secure it proves to your visitors that no one can access encrypted information sites like Google and YouTube and other popular sites that already have an HTTPS secured padlock.

Whenever your visitors try to visit your website with an HTTP protocol they will be greeted with the red scary warning now a padlock will also take away this warning which says hackers or attackers might be trying to steal information for instance passwords, messages, credit cards, or debit cards and if do not wants that to happen to your website, the only thing is to install an SSL certificate in cPanel.

How to install a free SSL certificate in WordPress cPanel?

Once you have cPanel for your domain log in to cPanel and keep that open for now. Go to a new tab and go to this website sslforfree is in the paragraph and once you are on this website type in your domain name it is SSL Certificate for free they use a let us encrypt certificate authority to create free SSL certificates.

Link to sslforfree:

Next, type in your domain name input field press Create free SSL, and signup or login if you already logged in to this site and wait for a second. That redirects you to the ZeroSSL admin panel once you logged in and there you could see the Create New Certificate so click it here you can see a lot of options to make a SSL certificate.

If you want to get a wildcard certificate you need to purchase the pro version so now we don’t want that so ignore that. Next, enter the domain in the “Enter Domains Input Field” and press next and you will see the validation of the domain duration is 90 days only for free. Purchase Pro if you want to extend the duration days of the SSL Certificate. Press next to make sure the Auto CSR is enabled to validate and contact. Press next and choose free that free plan only has limited features like 90 days of free SSL for 3 domains, etc. Once you have selected the plan you should validate the domain first. To validate the domain there you have three options DNS CName, Mail verification, and Upload the file in the cloud hosting Click manually to verify the domain and you will be able to see a bunch of steps now download the file to upload in the cloud hosting Cpanel. Once you successfully downloaded the file log in to the Cpanel.

After login into Cpanel right now and opening up file manager once file manager is opened scroll down and open your public HTML folder and press the new folder in there and name it .well-known and hit create a new folder. [Make sure you have enabled view hidden files in the Cpanel file manager settings] So wait let me tell make sure the .well – known and it might not show up here for you it might show up if it doesn’t show up right away. To view hidden files go over to settings press show hidden files and hit save the .well-known folder should be there now open up that folder click new folder and type in pki-validation is PKI validation and hit create a new folder and open up that folder and press upload the file which you are downloaded in sslforfree in ZeroSSL to validate.

Once you uploaded the file in the .well-known/pki-validation/validate.TXT directory then go to sslfofree of ZeroSSL panel click the validate of the domain and wait for a second you will get the message that successfully created the SSL certificate and download the certificates as a zip file. Extract the zip file from your computer locally and there you can see the three files are private.key , certificate, and ca_bundle.

Go back to your cPanel scroll down to under security you should see SSL / TLS open that up and press install and Manage SSL for your site press manage us all sites. Then once you e on this page scroll down press domain select your domain and in the first box where it says certificate copy the certificate from here tap in the Box hit ctrl-A and ctrl C use the command and paste. it is, once you paste it in it, should autofill these fields out if it does not and that is completely fine go back to this page here click in the private key box hit ctrl-a ctrl C go back to cPanel, and press control V again use command. Then scroll down some more and copy and paste the CA bundle from the SSL site again and once you are here paste that back in here and that is all.

Finally, click and install the certificate and give it a few seconds and it will install an SSL certificate. After a few seconds Now SSL certificate has been installed onto your website so you can go back and reload this page as you can see we have the green padlock on our page which means that our connection is now secured. Now you should want to force SSL whenever somebody visits our website. So you need to go here onto your website and in your public HTML directory you need to press create new file new and the file name is going to be .htaccess if it already exists press edit on it and once you have your data .htaccess file edit it and once you are editing this file paste the below code in and edit your domain with whatever your domain you are going to force.

Code for Forcing HTTPS on a Specific Domain

RewriteEngine On 

RewriteCond %{HTTP_HOST} ^yourdomain.com [NC] 

RewriteCond %{HTTPS} off 

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Code for Forcing HTTPS on all traffic

RewriteEngine On 

RewriteCond %{HTTPS} off 

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Code for Forcing HTTPS on a Specific Folder

RewriteEngine On 

RewriteCond %{HTTPS} off 

RewriteRule ^(folder1|folder2|folder3) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Once your domain is in there hit Save Changes and it should say success once you have installed the SSL certificate try visiting your website without the HTTPS protocol and it should automatically redirect to your website with HTTPS now there is one disadvantage to using this free SSL certificate which is that it will expire in 90 days which is three months. You have to redo this process every three months so you should do this routinely a little earlier than the expiry date and every time you go onward and redo this process make sure on your SSL page, go down and click uninstall the SSL certificate previously installed. So that is about it for this article if you guys like this article please be sure to leave a big comment down below that and we will see you later. Thank you.

Leave a Comment