How to Secure Your Website with SSL (The Fun Way!)

How to Secure Your Website with SSL (The Fun Way!)


🛡️ Why You Need SSL (And Why Google Hates You Without It)

Ever visited a website and saw "Not Secure" in the address bar? That’s basically Google screaming, "RUN! THIS WEBSITE IS A SCAM!"

SSL (Secure Sockets Layer) encrypts the data between your website and visitors, making sure hackers can't steal login details, credit card info, or even your embarrassing search history.

So today, we’re going full Tony Stark and putting a protective shield (SSL) on your website. Let’s get started! 🚀


🔧 Step 1: Install Certbot (Your SSL Fairy Godmother)

Certbot is the magic tool that handles SSL setup. Run this command like a boss:

sudo apt-get install certbot python3-certbot-nginx

🛑 Possible Error: "Command not found"

This means your Linux system is missing the required repositories.
Run this first:

sudo apt update && sudo apt install software-properties-common

Then, try installing Certbot again.

✅ Once installed, let’s move to the next step.


🌍 Step 2: Get Your SSL Certificate (Make Google Happy)

Time to convince Google that we are a trustworthy citizen.

🔹 To secure your website (abhishekanandok.com and www.abhishekanandok.com), run:

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

What Happens Next?

Certbot will now act like a strict visa officer and ask you:

  1. Your Email (For SSL renewal notifications)

    • Enter your best email unless you enjoy surprises when your SSL expires.
  2. Agree to Terms? (Y for Yes, unless you want to live dangerously)

  3. Would you like to share your email? (N because we all get enough spam already)


🤖 Step 3: Secure Your API Too (Because It’s Lonely)

If you have an API (api.abhishekanandok.com), it also needs SSL to avoid angry red warnings from browsers.
Run this:

sudo certbot --nginx -d api.abhishekanandok.com -d www.api.abhishekanandok.com

🔄 Step 4: Make SSL Renew Automatically (So You Can Relax)

Let’s Encrypt SSL expires every 90 days (because they like to keep us on our toes). Instead of manually renewing it like an unpaid intern, automate it with:

sudo certbot renew --dry-run

If you see "Congratulations! Dry run successful!", your SSL will renew itself like magic.

🛑 Possible Error: "Too many requests"

Let’s Encrypt has rate limits (because of people who abuse the system).
Wait for a few hours and try again.


🎉 Congratulations! You’re Now SSL Certified!

Your website is now rocking a padlock icon and looking super professional. No more "Not Secure" warnings, and Google will finally stop judging you.

✅ What’s Next?

  • Test your SSL here: SSL Checker

  • Enjoy the trust and love of your visitors

  • Share this guide with friends who still live in the "HTTP dark ages"

Happy Securing! 🔒✨🚀

Did you find this article valuable?

Support Abhishek Anand's blog by becoming a sponsor. Any amount is appreciated!