Secure Socket Layer or SSL is currently the foremost signal for the trust for a website. People look for the green padlock sign and decide whether or not to trust you with their precious data. Setting up SSL on a website has thus become an important task. It is fairly easy and gets done in a matter of seconds. Domain name registrars sell SSL certificates for a good price. But it is possible to get a free SSL certificate given by Let’s Encrypt certification authority.
In this post, we have a step by step tutorial on how to install SSL certificate on a website running on Digital Ocean Virtual Private Server. Also, check – vshare
Steps to setup free SSL certificate in a Digital Ocean Virtual Private Server
Follow these easy steps to install SSL certificate on a website running on Digital Ocean VPS.
- Open the website at www.sslforfree.com
- In the text box that you see, enter your domain name without the www part. SSLforfree website will automatically create SSL certificates for both the versions. If you have any subdomains, you need to enter that here.
- Now press the green button that says ”Create SSL Certificate”.
- Next, the website needs to verify your ownership of this domain name.
There are three ways to do this.
i) Manual File Verification : In this method, you will need to upload two files to a specific folder in your website’s files.Follow these steps.
a) Download the two files to your device.
b) Using any FTP software, login via FTP to your server. DigitalOcean sends the root user’s FTP details in an email at the time of creating the droplet.
c) Upload the two files to this location: “domain.com/.well-known/acme-challenge/files”
d) Now click on “Manual Verification” to complete the verification process.
ii) Automatic SFTP verification method: Here, you will be entering your SFTP credentials (username and password) and SSLforfree tool will automatically verify it for you. This will get the verification done in seconds and is the fastest method for DIgital Ocean users. The following details are needed to do the automatic SFTP verification:
a) Type: Choose the connection type (FTP or SFTP)
b) Host: Enter your hostname in this box. Hostname is the droplet IP of your DIgital Ocean server.
c) Port: Enter the port number, it is 22 for SFTP and 21 for FTP
d) User: Enter the SFTP username here. It is root for Digital ocean servers
e) Password: Enter the password of the SFTP user here. Digital Ocean sends both the username and password in the email when a droplet is created.
f) Directory: Enter the directory location of the folder where the website is installed.
g) Click on verify. Don’t forget to check dns_probe_finished_no_internet
iii) Manual Verification (DNS Method): Here, you will be adding two txt records to the DNS server of your domain name. Download the two txt files to a location on your computer. Now login to your domain registrar’s account and go to DNS management. Choose txt records and add the two records. Click on verify.
- Once you have successfully verified your domain, click on the Download SSL Certificate button.
- Now sslforfree will give you the three required certificates.
- On this page, you should login/register to a sslforfree account. SSLforfree certificates automatically expire after 90 days. It needs to be updated once that happens. SSLforfree will notify you before the expiration of this certificate on your mail address.
- Copy these three certificates and install them on your Digital Ocean server to enjoy the SSL status. You can install them manually or by using services such as ServerAvatar, ServerPilot. We recommend Server Avatar as it’s easy and cheap.
- If you happen to be a ServerAvatar user, simply go to the SSL option and paste the three certificates there. Choose your domain name, and click install.
- Voila! You can now view the green paddle lock icon of trust when you visit your website.
Conclusion of the Post –
In this post, we have seen how easy it is to setup SSL certificate for a website hosted on a Digital Ocean VPS. We have used a free SSL certificate here. Try it out and comment below if you face any issues with the same.