Installing Free SSL Certificate on Digital Ocean Droplet
Follow these steps to installing Free SSL Certificate on Digital Ocean Droplet
1. Open Putty or Terminal depending on your operating system.
2. Type in the host name or the IP address where you want to install SSL certificate and click on Open.
3. Log into your server by providing the username and password.
Once inside the server, copy and paste this below code on the Putty or the ssh client that you use.
4. Update server’s package manager
sudo apt-get update
5. This will let you manage the certificate which will be install into your server.
sudo add-apt-repository ppa:certbot/certbot
6. Update your server again.
sudo apt-get update
7. Install python certbot for apache
sudo apt-get install python-certbot-apache
While installing this press Y when prompted on the do you want to continue warning to accept it.
8. This command installs the Let’s Encrypt. Don’t forget to change example.com with your domain name.
letsencrypt --authenticator standalone --installer apache -d example.com
Once you press enter you will be prompted to enter your email address.
You need to enter your email address where you want to receive updates about your site. Also it will send you notification on this email once your certificate expires.
Enter your email and press enter.
Again when prompted if you have read the Terms and Conditions of Let’s Encrypt press A to accept it.
Next you will be asked if you want to share you email with the Electronic Frontier Foundation. Press Y to accept it.
This will now start to install the HTTPS certificate on your server.
You will be asked to choose whether you want to redirect all HTTP traffic to HTTPS.
Press 1 to not redirect the traffic and 2 to redirect all HTTP traffic to HTTPS and then press enter.
SSL will be successfully installed in your server.
9. Restart your apache to show the changes at the front end.
service apache2 restart
This will restart your apache for you.
10. Check For HTTPS
Type in this address into the browser to check if all traffics are redirecting to HTTPS.
Don’t forget to change example.com with your domain name.