X
X

Select Your Currency

Türk Lirası $ US Dollar
X
X

Select Your Currency

Türk Lirası $ US Dollar

Free SSL Certificate (Let's Encrypt) Installation on Nginx Server

HomepageArticlesSecurityFree SSL Certificate (Let's Encrypt...

How to Secure Your Website for Free (HTTPS)?

Using an SSL certificate (HTTPS) on modern websites is not a luxury, but a necessity for both security and SEO. Search engines like Google mark sites without an SSL certificate as "Not Secure". If you are using Nginx on your own Linux virtual server infrastructure, you can install an SSL certificate completely free of charge using Let's Encrypt and the Certbot tool.

Step 1: Install the Certbot Tool

The developer tool that allows you to automatically obtain and configure SSL certificates is Certbot. Access your Ubuntu (or Debian)-based server via SSH and enter the following commands to update the software repositories and install Certbot along with the Nginx plugin:

sudo apt-get update
sudo apt-get install certbot python3-certbot-nginx -y

Step 2: Verify Your Nginx Settings

For Certbot to configure SSL for you, your Nginx server block (or virtual host) must be correctly configured. Make sure the server_name line in the /etc/nginx/sites-available/yourdomain.com file matches your domain name:

server_name yourdomain.com www.yourdomain.com;

If you made changes, don't forget to reload Nginx: sudo systemctl reload nginx

Step 3: Obtain and Install the Certificate

Everything is ready! Now let's start the certificate automation by running the magic command:

sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

After this command, the system will ask you for an email address for emergency communications and ask you to accept the terms of service. Then, it will ask if you want to automatically redirect HTTP traffic to HTTPS. It is most appropriate for security to choose option "2" (Redirect) here.

Step 4: Test Auto-Renewal

Let's Encrypt certificates are valid for 90 days, but Certbot automatically creates a scheduled task (cron job) in the background that periodically renews this (before it expires). Enter this into the command line to test if this renewal function works correctly:

sudo certbot renew --dry-run

If you see a success message on the screen, congratulations! Your site is now free and secure forever.

If you do not want to spend time with certificate installations or technical configurations, meet our fully manageable Turkey VDS services, leave all your technical operations to our expert team.


Top