Web / Caddy Server Interview questions
What happens when Caddy fails to obtain a certificate?
A failed certificate request doesn't take the site down immediately. Caddy logs the specific ACME error, retries with an exponential backoff, and keeps serving whatever it can in the meantime.
If this is the very first certificate for a domain and issuance keeps failing, Caddy has no certificate to serve, so HTTPS requests to that host will fail at the TLS layer until issuance eventually succeeds; the site is still reachable over plain HTTP if you haven't forced a redirect. If instead this is a renewal failure and an old, still-valid certificate exists, Caddy keeps serving that certificate uninterrupted and simply keeps retrying renewal in the background - visitors see no change at all.
Common causes surfaced in the logs include DNS not pointing at the server, ports 80/443 blocked by a firewall, hitting a CA rate limit, or (for DNS-01 challenges) invalid DNS provider API credentials.
More Related questions...