CodeDevlify LogoCodeDevlify
All articles
Security

SSL That Renews Itself (And What Breaks When It Doesn't)

A practical look at automated certificate issuance — the ACME challenge types, why renewal fails quietly, and the monitoring that catches it before your visitors do.

Platform Engineering

Infrastructure & reliability

6 min read
A padlock with a renewal cycle arrow around it.

Free certificates solved the cost of HTTPS. They did not solve the operations of HTTPS — and a certificate that renews automatically 89 times and fails on the 90th is worse than one you had a calendar reminder for.

The two challenges, and when to use which

ChallengeProves you controlNeedsWildcards
HTTP-01The web server on port 80Port 80 reachable publiclyNo
DNS-01The DNS zoneAPI credentials for the DNS providerYes

HTTP-01 is the default because it needs nothing but a reachable server. We use DNS-01 for our own wildcard domain, so every newly provisioned site can serve HTTPS the instant it exists — before the customer has pointed anything at us.

Why renewal fails quietly

Renewal runs unattended, which means every failure mode is silent by construction. In order of how often we've actually seen them:

  1. A redirect swallowed the challenge. A blanket http → https redirect that catches /.well-known/acme-challenge/ too. Exempt that path, always.
  2. Rate limits. Retrying a broken config in a loop burns the weekly certificate budget for the whole domain, and then even a correct request fails.
  3. The renewal timer stopped. The unit was masked during an unrelated incident and nobody unmasked it. Certificates expired 60 days later.
  4. DNS moved. The customer changed nameservers; HTTP-01 kept working, DNS-01 silently stopped.
Shell
# What is actually installed, and when does it die?echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null   | openssl x509 -noout -subject -issuer -dates # Prove renewal works without spending a rate-limit slotcertbot renew --dry-run

Monitor expiry, not renewal

It's tempting to alert when the renewal job fails. Don't — alert on what the visitor sees. Check the certificate the server is actually presenting, and page someone when it has fewer than 21 days left. That catches the job failing, the job succeeding but not reloading the server, and the file being copied to the wrong path.

Monitor the outcome, not the process. Processes have a hundred ways to succeed at the wrong thing.

ssltlslets-encryptacmemonitoring
ShareXLinkedIn

Keep reading

Engineering

Anatomy of a 30-Second Site Provision

What actually happens between clicking “Create site” and a live HTTPS URL — the gRPC call, the container, the DNS wait, and the four places we had to stop blocking the request.

11 min read
Performance

Core Web Vitals Without the Headache

The four front-end decisions that move LCP, INP, and CLS more than any amount of micro-optimisation — with the measurements that tell you whether they worked.

7 min read

New posts, roughly twice a month

Engineering write-ups, performance notes, and what we learned running the platform. No product announcements dressed up as articles.

Unsubscribe in one click. We never share your address.