Secure your Website with SSL Certificates in 3 Steps

Secure your Website with SSL Certificates in 3 Steps

SSL Certificates are added to your website domain, thats ensures HTTPS to your website.

1. SSH Login into your VPS / EC2 Instance

Login into VPS or AWS EC2 Instance using SSH. SSH is a secure tunnel.

SSH into VPS

Copy to clipboard
ssh root@<ip-address>

SSH into AWS EC2 Instance

Copy to clipboard
ssh -i [saved_file_key].pem ubuntu@<public-ip-address>

2. Install required Packages

Copy to clipboard
sudo apt update
sudo apt upgrade -y
sudo apt install nginx certbot python3-certbot-nginx -y

Start the Nginx Service

Copy to clipboard
sudo systemctl start nginx
# To check the status of the Nginx Service
sudo systemctl status nginx

3. Install SSL Certificate

To install SSL certificates, you should ensure that nginx configuration files are created in /etc/nginx/sites-available.

Then also make sure symbolic link is created using ln -s ../sites-available/filename.conf

Copy to clipboard
sudo certbot --nginx -d domain.com -d domain1.com -d domain2.com

To add more domain names using -d .

That's it

If you have followed the steps above properly, SSL Certificate is installed on the specific domain and you can access it through https://domain.com in your preferred browser.

If there is any issue you are facing, you can comment below or contact me on imagarwal05@gmail.com .

Leave a Reply