Secure your Website with HTTPS for Free

July 29, 2017

Tweet
The Easiest Way to Secure Your Website in 3 Simple Steps in Under 5 Minutes

Are you looking for a way to secure your website or web application with HTTPS and not sure where to start?

Do you want to know how to get HTTPS without paying for expensive yearly certificates with GoDaddy etc?

This tutorial will guide you on how to install a security certificate for free, and have it automatically renewed. If you're hosting your website or web app on Digital Ocean or similar where you have SSH access to your server, you can easily implement HTTPS in a matter of minutes.

I'm using Nginx and Ubuntu 14.04 (trusty) so I select these two options on CertBot and it has an automated walkthough: https://certbot.eff.org/#ubuntutrusty-nginx

Install

On Ubuntu systems, the Certbot team maintains a PPA. Once you add it to your list of repositories all you'll need to do is apt-get the following packages.

Get Started

Certbot has an Nginx plugin, which is supported on many platforms, and automates both obtaining and installing certs:

Running this command will get a certificate for you and have Certbot edit your Nginx configuration automatically to serve it. If you're feeling more conservative and would like to make the changes to your Nginx configuration by hand, you can use the certonlysubcommand:

To learn more about how to use Certbot read our documentation.

Automating renewal

The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. Since Let's Encrypt certificates last for 90 days, it's highly advisable to take advantage of this feature. You can test automatic renewal for your certificates by running this command:

If that appears to be working correctly, you can arrange for automatic renewal by adding a cronor systemd job which runs the following:

More detailed information and options about renewal can be found in the full documentation.

Lets Encrypt

Let's Encrypt

CertBot.PNG

CertBot















Return to Blog