Caddy
Caddy makes HTTPS the default: write a hostname in the Caddyfile and it obtains, renews and serves a certificate with modern TLS settings. For self-hosted static sites that removes the most common source of outages, and its short configuration format removes most of the header and fallback mistakes that audits find in hand-written server configs.
The guides below take Caddy past a single site: several sites and wildcard preview subdomains on one server, testing against the staging certificate authority, persisting certificates across rebuilds, a complete security header set with a build-time CSP hash, and a load test against Nginx on identical machines.
Core Web Vitals Optimization for SSGs
- Precompressing Assets with Brotli and ZstdHow-toPrecompress static site output at build time with brotli 11 and zstd 19, serve the variants from Caddy, nginx or Cloudflare, and measure the transfer saving.
Production-Ready Deployment & CI/CD for SSGs
- Nginx vs Caddy for Serving Static SitesComparisonNginx and Caddy compared serving the same static site: throughput, latency, memory, TLS automation, config size, compression and the mistakes each one invites.
- Security Headers for Static Sites Served by CaddyHow-toConfigure HSTS, CSP, framing, referrer and permissions headers in a Caddyfile for a static site, with per-path rules, a snippet and header tests.
- Serving a Static Site With Caddy and Automatic HTTPSHow-toRun several static sites on one Caddy server with automatic certificates: DNS and ports, staging CA tests, rate limits, storage and wildcards.
- Serving a Static Site with CaddyHow-toHost a static site on Caddy with automatic HTTPS, clean URLs, precompressed files, cache tiers, security headers and per-pull-request preview subdomains.
Often used with Caddy
- nginx3 shared guidesSelf-hosted serving, compression and cache headers.
- Eleventy1 shared guidesIncremental builds, image pipelines and the data cascade.
- Cloudflare1 shared guidesPages and Workers hosting, cache rules and edge functions.