How to use Lets Encrypt to Enable HTTPS for Your Website

How to freely, and easily enable HTTPS for your website.

1941 views
d

By. Jacob

Edited: 2019-09-11 16:29

Article image

Finally, everyone is able to enable HTTPS for their website'(s) without having to pay huge sums of money for SSL certificates. Thanks to Let's Encrypt the process is now very easy.

SSL certificates used to cost money, some you could get for just 10$ per year, while others would cost hundreds of dollars. This has luckily started to change.

After installing letsencrypt for your webserver, you may be able to enable HTTPS for individual VHOSTs using by typing sudo letsencrypt in a terminal and following the instructions in the program.

Note. It may be important to keep each Virtual Host in its own .conf file in the sites-available directory, since having multiple hosts in the same file might cause problems.

Enabling HTTPS in Ubuntu

If you have SSH access to your server, all you have to do is to login, and run a couple commands in terminal. If you are running Apache on in Ubuntu, then you can use the following commands:

sudo apt-get install python-letsencrypt-apache
letsencrypt --apache

The letsencrypt --apache command will take you through the process, and automatically configure apache with your certificate. It will ask you for an e-mail address for notifications when your certificate is about to expire.

Certificates expire in just 90 days, but since the process of renewal is automatic, this will not matter. You can setup a cron or systemd job to automate renewal. Otherwise simply type sudo letsencrypt when it is time to renew your certificates.

Reasons why you should move to HTTPS

The most obvious reason is the extra security, you can read more in Google's guide, Secure your site with HTTPS. A few reasons listed in the guide:

  1. Encryption—encrypting the exchanged data to keep it secure from eavesdroppers. That means that while the user is browsing a website, nobody can "listen" to their conversations, track their activities across multiple pages, or steal their information.
  2. Data integrity—data cannot be modified or corrupted during transfer, intentionally or otherwise, without being detected.
  3. Authentication—proves that your users communicate with the intended website. It protects against man-in-the-middle attacks and builds user trust, which translates into other business benefits.

In addition to the increased security, Google will also provide a small ranking boost to URLs served over HTTPS.

After July 2018, non-https sites will be labeled as Not Secure in their Google Chrome browser, scheduled for Chrome 68.

Sources

  1. Certbot - certbot.eff.org
  2. Let's Encrypt - letsencrypt.org

Tell us what you think:

  1. An in-dept look at the use of headings (h1-h6) and sections in HTML pages.
  2. Pagination can be a confusing thing to get right both practically and programmatically. I have put a lot of thought into this subject, and here I am giving you a few of the ideas I have been working with.
  3. The best way to deal with a trailing question mark is probably just to make it a bad request, because it is a very odd thing to find in a request URL.
  4. How to optimize image-loading and automatically include width and height attributes on img elements with PHP.
  5. HTTP headers are not case-sensitive, so we are free to convert them to all-lowercase in our applications.

More in: Web development