Securing your website by installing SSL on Ubuntu with Certbot is crucial for data protection and search engine ranking. Follow this step-by-step guide to install SSL on your Ubuntu server efficiently.
sudo apt update && sudo apt upgrade -y
Certbot is the recommended tool to obtain and install SSL certificates. Install Certbot and its web server plugin:
For Nginx:sudo apt install certbot python3-certbot-nginx -yFor Apache:
sudo apt install certbot python3-certbot-apache -y
Ensure your web server (Nginx or Apache) is running and that your domain name points to your server's IP address. Certbot will automatically detect your web server's configuration during the SSL installation process.
Run Certbot to automatically obtain and install your SSL certificate:
For Nginx:sudo certbot --nginxFor Apache:
sudo certbot --apacheCertbot will:
sudo certbot renew --dry-run
This simulates a renewal without making actual changes, ensuring everything is set up properly.
Learn more about Let’s Encrypt and SSL certificates from Let’s Encrypt’s official website.
sudo apt update && sudo apt upgrade -y sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginxLearn how to Setup SSL/ HTTPS on NGINX on CentOS 8/ AlmaLinux 8/ RockyLinux 8.