Connect with us

Blogging

How To Install Free Let’s Encrypt SSL Certificate On Your Website With Auto Renewal

Published

on

How to Install a Free Let's Encrypt SSL Certificate On Your Website With Auto Renewal

In this article, I will show you how to install a free Let’s Encrypt SSL Certificate on your website via SSH or cPanel and set it up for auto renewal.

It is no longer a question of whether your website needs an SSL Certificate or not. Every of your website should be launched with an SSL Certificate in place if you want search engines and browsers to take you serious from the beginning. In the beginning, SSL Certificate was a thing of choice and did not hold any SEO value, however the need for a more secure connection between systems, users of a website and the need to protect the information of the users of a website has made search engines move to reward websites with SSL Certificates installed over those without an SSL Certificate.

The browsers, led by Google and Mozilla, in 2017 made it mandatory for all websites to serve data over an encrypted connection via HTTPS. To encourage more people to install SSL Certificates on their websites, the browsers created a secure and not secure labels for websites and even show a warning to users when they try to access a website without an SSL Certificate installed.

An SSL Certificate makes sure users’ information are protected when they enter their login details on a website, credit card details, financial information and even personal data. In a bid to have a safer internet, Google and other search engines decided to give preferences to websites having SSL Certificates installed.

Kindly note that installing an SSL Certificate alone does not mean that your website is well optimized to do well on search engines. Here are ways you can optimize your website to do well in search engines aside having an SSL certificate installed.

Though it is not expensive to get an SSL Certificate for your website and it is even better as you can get SSL Certificates for all your websites totally for free, thanks to Let’s Encrypt. Feel free to donate to them if you love what they are doing.

What is Let’s Encrypt?

Let’s Encrypt is a free, automated, and open certificate authority (CA). In a bid to have a safer internet, Let’s Encrypt embarked on a mission to issue free SSL Certificates for websites and they have been doing it so well.

How To Install A Free Let’s Encrypt SSL Certificate

If you are using a shared hosting for your website, your host provider may have made available a one click installation button for Let’s Encrypt SSL Certificate. If they didn’t, you can still install the Let’s Encrypt SSL certificate as long as you have SSH Access to your server.

Regardless of the hosting account you are using; Dedicated Server, VPS or Shared Hosting, you can install a free Let’s Encrypt Certificate by following the steps below;

STEP 1:
Connect to your server via SSH. You can do this right from your cPanel by navigating to the Advanced section in your cPanel and clicking on Terminal to connect to your server via SSH. If you are using a Dedicated Server or VPS with a cPanel but can not find the Terminal button, do not panic. You can enable this feature on your cPanel from your WHM dashboard.

Installing a Free Let's Encrypt SSL Certificate On Your Website With Auto Renewal

STEP 2: Copy and paste the command below on your terminal and hit the enter key.

curl https://get.acme.sh | sh

The above command will install a script called .acme.sh which is found on GitHub and used to install the free Let’s Encrypt SSL Certificate. After the installation of the script is complete, a hidden directory with the name, .acme.sh would be created at the root of your server (at the user level of your cPanel account).

STEP 3: Copy and paste the command below on your terminal and hit the enter key. Before running this command, kindly read the note below the command first.

.acme.sh/acme.sh --issue -d example.com -w /home/username/example.com/

The above command would only issue the SSL Certificate for only example.com while www.example.com would not be secured. To secure both example.com and www.example.com, kindly run the command below instead.

.acme.sh/acme.sh --issue --server letsencrypt -d example.com -d www.example.com -w /home/username/example.com/

Remember to change example.com and www.example.com to your domain name. Also, change /home/username/example.com/ in the command to the document path of the root of your website. You can check this in your cPanel by navigating to the Domain section of your cPanel, click on Domains, and on the column showing Document root, hover your mouse on your domain and take note of the full document path that will show up as you hover. That is the path to the root of your website.

Now run the command below to set letsencrypt as the default certificate issuer for auto renewal. This is important as default certificate issuer now is ZeroSSL and if you do not run this command, it will try to issue a ZeroSSL certificate instead of Letsencrypt during auto renewal which happens every 90 days.

acme.sh --set-default-ca --server letsencrypt

STEP 4: Navigate into the .acme.sh directory by running the command below.

cd .acme.sh/

STEP 5: Navigate into the folder containing your SSL Certificate and Private Key by running the command below.

cd example.com

Remember to change example.com to your domain name.

STEP 5: View and copy your Certificate and Private Key respectively by running the commands below.

cat example.com.cer

This code would show your certificate. Copy the entire certificate beginning from the line showing BEGIN CERTIFICATE to the end of the line showing END CERTIFICATE and paste it somewhere, preferably on notepad. Do the same thing to get your Private Key with the command below.

cat example.com.key

Always remember to change example.com to your domain name. Now you can exit your terminal by typing exit and hit the enter key. Now, it is time to head to cPanel to install the free Let’s Encrypt SSL Certificate with the details you have copied.

How to Install Let’s Encrypt SSL Certificate in cPanel

In your cPanel, navigate to the Security section, and click on SSL/TLS

How to Install a Free Let's Encrypt SSL Certificate On Your Website With Auto Renewal

In the page that opens, click on Manage SSL site.

Installing Free Let's Encrypt SSL Certificate via cPanel

Fill the form in the page that opens, first select your domain name from the drop down, and then paste the certificate and private key you copied earlier in their appropriate fields and then click on Install Certificate.

Install Free Let's Encrypt SSL Certificate On Your Website With Auto Renewal

Your SSL Certificate has now been installed.

I am a tech enthusiast, a problem solver and a keen writer. Most of my writings here are how I solved tech problems many people might also be facing

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *