Why every website needs an SSL certificate, and how to set one up with Let's Encrypt
SSL certificates stopped being optional years ago. Chrome has labelled every HTTP page “Not secure” since Chrome 68 in 2018, other browsers do the same, and Chrome is moving to HTTPS by default, which means visitors get a warning before a plain HTTP site even loads. HTTPS is also a ranking signal in Google Search. A certificate from Let’s Encrypt is free and renews itself, so there’s really no excuse for an http-only website today.
Let’s encrypt your server!
Personally, I use Forge to manage most of my clients’ servers. Forge installs a Let’s Encrypt certificate on any managed site in one click and renews it for you.
If you don’t use a tool like that, you can install Let’s Encrypt yourself, but your hosting provider needs to support the ACME protocol. Without it there’s no way to automate renewals, and Let’s Encrypt certificates are only valid for 90 days. That lifetime keeps getting shorter (Let’s Encrypt plans to move to 45-day certificates by 2028), so renewing by hand isn’t a realistic option.
Many shared hosts now issue free certificates straight from their control panel, so check there first. You can also look your provider up on the community-maintained list of hosting providers that support Let’s Encrypt.
To start with this tutorial you need:
- comfort with the command line
- an HTTP website that is online with port 80 open
- a server that you can access via SSH with sudo rights
Using Certbot on your server
First, SSH into your server as a user with sudo rights. We’re going to use Certbot to get the certificate and renew it automatically. The examples use Ubuntu, but Certbot supports most Linux distributions.
Certbot no longer ships through the old ppa:certbot/certbot PPA, and the recommended install is now the snap package. If you installed Certbot with apt in the past, remove it first.
## Remove Certbot installed from apt or the old PPA
sudo apt-get remove certbot
Then install Certbot and make the command available. The snap already includes the Apache and Nginx plugins.
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Time to set up your certificate!
## If you're using Apache
sudo certbot --apache
## If you're using Nginx
sudo certbot --nginx
After running the command you’ll be asked for an email address and the domains you want to secure. Certbot updates your server config and sets up a timer that renews certificates before they expire. Let’s Encrypt stopped sending expiry reminder emails in 2025, so don’t count on a warning. Test renewal yourself with sudo certbot renew --dry-run.
To install Certbot on other systems, check the Certbot instructions for your web server and operating system.
What’s an SSL certificate and HTTPS protocol?
Don’t know the difference between HTTP and HTTPS? You’ll either see http:// or https:// at the start of your website URL.
HTTP stands for Hypertext Transfer Protocol, and HTTPS is its secure version, Hypertext Transfer Protocol Secure. In HTTPS, the communication is encrypted using Transport Layer Security (TLS). Its predecessor, Secure Sockets Layer (SSL), is long deprecated, but “SSL certificate” is the name that stuck.
This means that your site is protected through authentication and encryption. When installed on the web server, a certificate enables HTTPS and the padlock in the browser, and allows secure connections between the browser and the web server.
The main reasons for HTTPS are authenticating the website you’re visiting and protecting the privacy and integrity of the data while in transit. This protocol protects against man-in-the-middle attacks. The encryption of communications between a client and server protects against eavesdropping and tampering with the data sent.
In practice, this gives you reasonable assurance that you’re talking to the website you intended to reach, without interference from attackers, and not to an impostor.
Why all websites are not using encrypted connections?
Well, there used to be one problem. The authentication aspect of HTTPS requires a trusted third party to sign server-side digital certificates, which historically was expensive.
That’s why full authenticated HTTPS connections were more commonly found only on secured payment transaction services, and other secured corporate information systems.
In 2016 a non-profit organization, Let’s Encrypt, began to offer free server certificates to all! It now secures hundreds of millions of websites, and the vast majority of pages loaded in Chrome use HTTPS. The sites still on plain HTTP are the ones that stand out.
My server provider is not allowing me to install Let’s Encrypt, what should I do?
That’s a bummer but not really that uncommon!
If your provider doesn’t let you set up SSL certificates, I can recommend 2 great options for your server: Digital Ocean and Linode (now part of Akamai Cloud). Both have proved themselves over the years working with clients around the world. For Polish customers, there’s also another option (it’s a shared hosting provider) Zenbox which I use alongside Digital Ocean.
The pricing is similar, so it comes down to personal preference (I prefer Digital Ocean). Sign up for Digital Ocean through the links in this article and you get free credit for your first 60 days, plenty to try out a server for a small website.