🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

SSL/TLS Certificates with Let's Encrypt: Complete Guide (2026)

SSL/TLS Certificates with Let's Encrypt: Complete Guide (2026)

Quick Summary: Let's Encrypt provides free, automated SSL/TLS certificates trusted by all major browsers. Using Certbot (the official client), you can secure your website with HTTPS in under 5 minutes. Certificates are valid for 90 days and auto-renew automatically. This guide covers setup for NGINX and Apache, wildcard certificates, and troubleshooting common issues.

SSL TLS certificates with Let's Encrypt

Why HTTPS Is Mandatory in 2026

  • Google Chrome marks HTTP sites as "Not Secure" since 2018
  • HTTPS is a ranking factor for Google Search
  • Modern web features (HTTP/2, service workers, geolocation) require HTTPS
  • PCI DSS compliance requires encryption for any payment processing
  • User trust: visitors abandon sites without the padlock icon

Installing Certbot

For NGINX

  • Debian/Ubuntu: sudo apt install certbot python3-certbot-nginx
  • RHEL/AlmaLinux: sudo dnf install certbot python3-certbot-nginx

For Apache

  • Debian/Ubuntu: sudo apt install certbot python3-certbot-apache
  • RHEL/AlmaLinux: sudo dnf install certbot python3-certbot-apache

Obtaining a Certificate (Step-by-Step)

  1. Ensure your domain's DNS A record points to your server
  2. Ensure your web server is running and accessible on port 80
  3. Run Certbot:
    • NGINX: sudo certbot --nginx -d example.com -d www.example.com
    • Apache: sudo certbot --apache -d example.com -d www.example.com
  4. Certbot automatically configures your web server for HTTPS
  5. Verify: visit https://example.com — you should see the padlock

Certificate Types

TypeCoverageCommand
Single domainexample.com onlycertbot --nginx -d example.com
Multiple domainsexample.com + wwwcertbot --nginx -d example.com -d www.example.com
Wildcard*.example.comcertbot certonly --manual --preferred-challenges dns -d "*.example.com"
StandaloneNo web server neededcertbot certonly --standalone -d example.com

Auto-Renewal

Certbot sets up automatic renewal by default. Certificates renew when they have less than 30 days remaining:

  • Test renewal: sudo certbot renew --dry-run
  • Check timer: systemctl list-timers | grep certbot
  • Manual renewal: sudo certbot renew

SSL Configuration Best Practices

SettingRecommended ValuePurpose
TLS versionTLSv1.2 and TLSv1.3 onlyDisable insecure older versions
HSTS headermax-age=31536000; includeSubDomainsForce HTTPS for 1 year
OCSP StaplingEnabledFaster certificate validation
HTTP to HTTPS redirect301 permanent redirectNo unencrypted access
Cipher suitesModern only (AESGCM, CHACHA20)Strong encryption only

Troubleshooting

ProblemCauseSolution
Challenge failedPort 80 blocked by firewallOpen port 80: ufw allow 80
DNS not propagatedA record not pointing to serverWait for DNS propagation or verify with dig
Rate limit exceededToo many certificate requestsWait 1 hour; use staging for testing
Mixed content warningsHTTP resources on HTTPS pageUpdate all URLs to HTTPS or use //
Certificate expiredAuto-renewal failedCheck certbot renew and timer status

Frequently Asked Questions

Are Let's Encrypt certificates as secure as paid ones?

Yes. Let's Encrypt certificates use the same encryption strength as paid certificates. The encryption (TLS) is identical. Paid certificates (EV, OV) offer visual indicators (company name in address bar) and warranty, but the actual encryption is the same.

Why do Let's Encrypt certificates expire every 90 days?

Short lifetimes encourage automation and reduce the damage from compromised certificates. With auto-renewal set up, the 90-day lifetime is transparent — Certbot handles everything automatically.

Can I use Let's Encrypt for wildcard certificates?

Yes. Wildcard certificates require DNS-01 challenge validation: you must add a TXT record to your DNS. Use certbot certonly --manual --preferred-challenges dns -d "*.example.com" or automate with DNS plugins.

Related Resources

Share this article:
Dargslan Editorial Team (Dargslan)
About the Author

Dargslan Editorial Team (Dargslan)

Collective of Software Developers, System Administrators, DevOps Engineers, and IT Authors

Dargslan is an independent technology publishing collective formed by experienced software developers, system administrators, and IT specialists.

The Dargslan editorial team works collaboratively to create practical, hands-on technology books focused on real-world use cases. Each publication is developed, reviewed, and...

Programming Languages Linux Administration Web Development Cybersecurity Networking

Stay Updated

Subscribe to our newsletter for the latest tutorials, tips, and exclusive offers.