If you're looking for a free alternative to paid SSL/TLS certificates, you can use Let's Encrypt, which is a non-profit organization that provides free certificates. They are widely supported and trustworthy, and their certificates are just as secure as paid options.
However, Let's Encrypt certificates have a limitation: they're only valid for 90 days. After 90 days, you'll need to renew your certificate to maintain HTTPS.
Here's how to obtain a free SSL/TLS certificate from Let's Encrypt:
- Install Certbot: If you haven't already, install Certbot on your Ubuntu VPS using the following command:
sudo apt-get update
sudo apt-get install certbot
-
Create or update your domain configuration: Make sure your domain is properly configured on your VPS. Edit your domain configuration file (e.g., Nginx or Apache configuration) and add the necessary server block or virtual host configuration for your domain.
-
Enable HTTPS: In your domain configuration file, replace the HTTP (80) port with HTTPS (443) port for your domain. For example, if you have a server block for example.com, replace server { listen 80; with server { listen 443;
-
Run Certbot: Open a terminal on your VPS and run the following command to start the setup wizard:
sudo certbot --nginx
This command will automatically detect your domain configuration and guide you through the setup process. Follow the prompts, and when prompted, choose the "nginx" web server.
-
Complete the setup: Certbot will perform a series of checks, obtain or renew your SSL/TLS certificate, and then generate the necessary configuration files. Once the setup is complete, you will be asked to restart your web server (e.g., Nginx or Apache).
-
Test your HTTPS connection: Open your domain using a web browser, and you should see that it now communicates using HTTPS. You can also use online tools like SSL Labs (https://www.ssllabs.com/) to verify the SSL/TLS configuration and identify any issues.
Remember to periodically renew your SSL/TLS certificate using Certbot's automated renewal feature to ensure continuous secure communication.