Installing Free Let’s Encrypt SSL Certificate on your GoDaddy Linux Hosting Account along with auto renewal using acme.sh – Complete Guide

Being a loyal Godaddy User it was always a sad fact for me to be unable to use the free Let’s Encrypt SSL Certificate on Godaddy with ease while many other hosting providers had the feature baked into their CPanel. I had been using a lot of paid SSL Certificates for sites that would not generate any revenue for me.

I tried using the certificate with the help of Zero SSL which still needed to renew manually every 90 days, 60 days to be precise and I would never really remember that until the sites showed certificate error after it already expired which was a big pain to me. And also that, with the free plan I could manage only three SSL Certificates. This was not a proper solution for so many reasons.

Then later while I followed the documentation from Godaddy:

https://ph.godaddy.com/help/install-a-lets-encrypt-certificate-on-your-linux-hosting-account-28023

https://letsencrypt.org/docs/client-options/

I reached a link (Above Link) that had quite a few ways I could automate my free certificate on Shared Linux Godaddy Hosting Account and decided to dive deep until I got some truly good results.

acme.sh

After looking for a few options and failing, I felt like going a bit further with the documentation of acme.sh.

Here are the ways I followed to successfully Install Let’s Encrypt SSL Certificate on my website hosted on Godaddy Linux Hosting Account

  • Open SSH Shell
    I did this through the command line so make sure you have ssh access to the server. If not enable SSH Access from your hosting dashboard.
  • Login to your account and on your home directory, type the following command to get acme.sh

    curl https://get.acme.sh | sh -s email=youremail@address.com

    I mostly use Termius for accessing remote servers for its efficiency.

    You can ignore the message: “It is recommended to install socat first.” as it has no impact on installing the certificate.
    I actually went through the process of installing socat also but got lost due to limited access and later realized, it was all worthless.

  • Now perform the following to Issue Certificate after successfully installing acme.sh

    $ cd .acme.sh

    $ ./acme.sh –issue -d yourdomain.com -d www.yourdomain.com -w /home/your-folder/public_html

    -d yourdomain.com [Include all your domains or www and non www versions here]
    -w /home/your-folder/public_html [Include your website root here, it can be /var/www/html or /home/public_html or anything where your website resides]

    I’m trying to show you what I exactly typed and what results I got for you to be more comfortable doing stuffs. I got this timeout because I mis-typed the domain name
    I could successfully install the certificate on my server and I noticed that It registered an account for me in zerossl and downloaded the certificate files from the same.
    The certificate files and key files saved in the .acme folder as you can see in the above image

    You can get the key files from the File Manager within your CPanel

    Time to Install on CPANEL & Redirect all request to https

  • Login into your CPANEL and look for SSL/TLS Option

    Make sure you have copied the content of fullchain.cer and domain.key files. You can get them using nano/cat command from your command line or you can directly open the file from File Manager in your CPANEL, use whatever way you find comfortable.
  • Click On (Open) the link that says [ Generate, view, upload, or delete SSL certificates ] on the right side
  • Paste the content of fullchain.cer into the text-area box that says
    [Paste the certificate into the following text box:]
    And click on Save Changes
    The changes will be saved.
  • Click on Go Back

    You will see the recently added certificate in the list

  • Now go to the bottom of the page and click on
    [ Return to SSL Manager]
  • On the next page click on
    [ Manage SSL sites.]
  • In that page click on [Browse Certificates] Button
  • Choose the certificate that you recently added from the list and click on Use Certificate
  • It will fill the form with the certificates that you just installed
  • Now You will see an empty box where you can [ Private Key (Key) ], paste the content of the domain.key file that you copied earlier and click on [ Install Certificate ] Button
  • Your certificate will be installed.

    That’s all about installing Free Let’s Encrypt SSL Certificate on your Godaddy Linux Hosting Account using acme.sh

    Now you can try opening your website with https://yourdomain.com and you can see it opens with a security padlock, i.e. verified SSL

    Time to Force Redirect all request to https from http

In order to redirect all request to https open your CPANEL or from your SSH Shell open .htaccess file in the project root if it exists, if not create a new file and name it .htaccess and type the following content in the file

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain\.com
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Mine looks like this

 

Now enjoy Free SSL on your Godaddy Linux Hosting

I prepared this documentation with this much detail because I struggled to rightly do it most often, CHEERS!

 

 

Author
Barun Gautam