ssl-guides 2026-12-02 ⏱ 3 min read

Free SSL Certificate with Certbot: Step by Step

Free SSL Certificate with Certbot: Step by Step
Quick Answer: To get a free SSL certificate with Certbot, install it, then run sudo certbot --nginx -d example.com -d www.example.com for Nginx or --apache for Apache. Certbot validates the domain, installs the certificate and schedules renewal. No web server plugin? Use the certonly command with the webroot or standalone method.

Before you get a free SSL certificate with Certbot

  • Your domain's DNS must point to the server (DNS lookup shows what it resolves to).
  • Port 80 must be reachable from the internet for HTTP validation.
  • If you set CAA records, they must allow Let's Encrypt. Check with the CAA checker.

Free SSL certificate with Certbot: pick a method

MethodCommandUse when
Nginx plugincertbot --nginxNginx is running and you want automatic config edits
Apache plugincertbot --apacheApache is running, same convenience
Webrootcertbot certonly --webrootYou want to edit config yourself and keep the server running
Standalonecertbot certonly --standaloneNo web server yet, or non-web services such as a mail server
DNScertbot certonly --dns-...Wildcards or servers not reachable on port 80

Examples

# Nginx with automatic config
sudo certbot --nginx -d example.com -d www.example.com

# Webroot, no config changes
sudo certbot certonly --webroot -w /var/www/html -d example.com -d www.example.com

# Standalone, needs port 80 free
sudo certbot certonly --standalone -d example.com

Files appear in /etc/letsencrypt/live/example.com/. Point your server at fullchain.pem and privkey.pem. Do not copy the files elsewhere, because the "live" entries are symlinks that Certbot updates at renewal.

Renew a free SSL certificate with Certbot

Packages normally install a systemd timer or cron entry. Check it with a dry run:

sudo certbot renew --dry-run
sudo certbot certificates

Let's Encrypt certificates last 90 days today, 64 days from 10 February 2027 and 45 days from 16 February 2028 (Let's Encrypt announcement). Certbot renews once less than a third of the lifetime is left, which is 30 days on a 90-day certificate, about 21 on a 64-day one and 15 on a 45-day one (Certbot docs). For deploy hooks, timers and monitoring, read how to renew a free SSL certificate automatically and how to renew SSL without downtime.

Common errors

MessageCauseFix
Timeout during connectFirewall blocks port 80Open port 80
Unauthorized / 404 on the challengeWrong webroot path or a rewrite ruleCheck -w path and allow /.well-known/
DNS problem: NXDOMAINName does not exist yetCreate the DNS record
Too many certificatesRate limit hitWait, and test with --dry-run
Address already in useStandalone cannot bind port 80Stop the web server or use webroot

Verify

After installation, run the SSL checker to confirm the chain and expiry date, and the HTTPS redirect checker if you enabled the redirect. For a full server walkthrough, see the VPS SSL guide.

Related reading: fixing Certbot renewal errors, what the ACME protocol is and installing free SSL without cPanel.

Frequently Asked Questions

Is Certbot the only way to use Let's Encrypt?

No. Many ACME clients exist, and hosting panels often include their own. Certbot is the most common reference tool.

Can I get a certificate for an IP address or localhost?

Let's Encrypt can issue IP address certificates only through its shortlived profile, which lasts about 160 hours (Let's Encrypt profiles). The normal flow needs a real domain name, and localhost cannot get a public certificate.

How do I revoke or delete a certificate?

Use certbot revoke --cert-path ... to revoke and certbot delete to remove local files.

Does the first run need an email address?

Certbot asks for one as the account contact. Let's Encrypt stopped sending expiry notices on 4 June 2025 (Let's Encrypt announcement), so it does not replace an expiry alert.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant