Install FREE SSL Certificate on Shared Hosting (from cPanel) by Let’s Encrypt
SSL is the backbone of our secure Internet. Not just the Green Bar, It basically protects your sensitive information. An SSL certificate activates the padlock and the https protocol and allows secure connections from a web server to a browser. Bellow are some references for more information about “Why SSL is important and Why it impacts on SEO score”
Anyways, SSL certificates are costly and for a blogger or small size business owner it is impossible to bear the SSL certificate charges.
Let’s Encrypt is a free, automated, and open Certificate Authority.
How to Install Let’s Encrypt Free SSL on Shared Hosting?
- Login to your cPanel and Enable SSH Access. How to?
- Connect to your host from putty or any other ssh client.
- Now you are in Terminal of your Host.
- Install Git if not installed.
- Clone Acme Client from git by the following command
git clone https://github.com/kelunik/acme-client
- Navigate to acme-client
- Install Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; php composer-setup.php; php -r "unlink('composer-setup.php');"; php composer.phar install --no-dev
- Now After completing the previous steps successfully go for SSL generation: Run the following command replacing the Red text with your own email ID
php bin/acme setup --server letsencrypt --email firstname.lastname@example.org
- Now Run the following command with replacing the Red texts with your own url and path
php bin/acme issue --domains yourdomain.com:www.youdomain.com --path /home/your_hosting_username/public_html:/home/your_hosting_username/public_html --server letsencrypt
- If successfully generated you’ll find the certificate files in
- To access those files simply go to file manager and open acme-client/data/certsacme-v01.api.letsencrypt.org.directory/yourdomain.com.
- You’ll find 4 files like bellow. You need the 2 of them cert.pem & key.pem as selected in the image.
- Now open two files in 2 new tabs. a and open the cPanel Home and navigate to SSL/TLS
- Go to the option “Install and Manage SSL for your site (HTTPS)”.
- Now select the domain you want to install ssl for from the List (if any).
- Now Copy the Full content of the cert.pem file and paste into the Certificate field. And Copy the full content of key.pem file and paste into the Private Key Field and click Install.
- No more steps, Welcome to the Green Bar.
How to check the Validity of the certificate?
Its important because the major problem with this Let’s Encrypt certificate is that – You have to renew the certificate in every 3 months. You can check the certificate’s expiry date by the following command: (Change the Red text)
php acme-client/bin/acme check --name yourdomain.com --server letsencrypt
How to Renew Let’s Encrypt SSL?
Run the following command from ssh
php acme-client/bin/acme issue --domains yourdomain.com:www.yourdomain.com --path /home/your_hosting_username/public_html:/home/your_hosting_username/public_html --server letsencrypt
Then Check if the Site’s SSL validity is updated or not. If still not updated then follow the Step no 16. Then it’ll work fine.
Still having problem? Comment bellow or you may contact us.