Skip to content

Add SSL

Video Lecture

Add SSL Add SSL

 (Pay Per View)

You can use PayPal to purchase a one time viewing of this video for $1.49 USD.

Pay Per View Terms

  • One viewing session of this video will cost the equivalent of $1.49 USD in your currency.
  • After successful purchase, the video will automatically start playing.
  • You can pause, replay and go fullscreen as many times as needed in one single session for up to an hour.
  • Do not refresh the browser since it will invalidate the session.
  • If you want longer-term access to all videos, consider purchasing full access through Udemy or YouTube Memberships instead.
  • This Pay Per View option does not permit downloading this video for later viewing or sharing.
  • All videos are Copyright © 2019-2025 Sean Bradley, all rights reserved.

Description

Let's make http://my-project.your-domain.tld have an SSL certificate and auto-forward all HTTP traffic to HTTPS.

Note

It is important that your domain name has fully propagated across the internet before attempting this step since the CertBot servers will try to validate your domain from different locations in the world.

DNS Checker works well for checking global DNS propagation. Enter your domain and select the A option.

These instructions are for Nginx running on Ubuntu 24.04 LTS. For different operating systems and web servers, check the Certbot website.

A brand new Ubuntu 24.04 will have snap running already.

You can check by typing,

#
snap -h

You should see the hlp information and not an error.

If you need to install snap,

#
#
apt update
apt install snapd

And restart your server.

Install CertBot.

#
snap install --classic certbot

Prepare the CertBot command

#
ln -s /snap/bin/certbot /usr/bin/certbot

Now we can run CertBot and follow the prompts.

#
certbot --nginx

Now visit the https version of your URL.

https://my-project.your-domain.tld

You can also visit the example that was created in the video.

https://my-project.sbcode.net