Install SSL certificate for free in Digital Ocean using let’s encrypt ubuntu

Hi Guys, SSL is the most prominent factor in SEO and digital marketing, even most browsers show it non-secure when you don’t hae SSL installed on your site and your visitors get away. So in this article, I will cover how to install a free SSL certificate if you are using any cloud server with Ubuntu OS. I’m taking an example of Digital Ocean.

I have just set up a sub-domain (and this blog is in the same continuation of that – to better understand please go through How to setup Sub-domain in digital Ocean & Activate SSL)

Step1. Check Certbot is install or not?

What is Certbot?

Certbot is a client that helps in installing SSL certificates, also provides automatic redirection facilities to http –> https. In simple language, you can say Certbot is a software that helps to install SSL certificates.

How to check if Certbot is already installed?

Open your terminal through SSH or putty and type following command –


You are getting this No command ‘certbot’ found – means you need to install it.
Install it by pressing the following command

sudo add-apt-repository ppa:certbot/certbot


sudo apt-get update

Then Final

sudo apt-get install python-certbot-apache

Step 2. Install SSL on domain or sub-domain

There are three possibilities of this command to install SSL on your domain or sub-domain (Replace your domain/sub-domain from the bold text)

  1. If you want to install on non-www
    use the command:

    sudo certbot --apache -d
  2. If you want to install on www
    use the command:

    sudo certbot --apache -d
  3. In case you want to install on both non-www and www
    use the command:

    sudo certbot --apache -d -d
    install letsencrypt digital ocean ubuntu

Then it will ask for redirection – select 1. (No. Redirection – check read marker in below image).
install letsencrypt ubuntu 16.04 nginx
and it will install your SSL certificates.

Just restart your server by pressing following command –

sudo service apache2 restart

You can test your configuration at (replace bold with your domain/sub-domain)

That’s it – you are ready for testing.
Just hit your domain with https like in my case

free ssl installation in ubuntu

install letsencrypt ubuntu 16.04 nginx

Thanks for any query or support you can contact us.