tldrTLS
Colour theme

Example configs

Pick your server and get one complete TLS config.

Answer four questions, paste the result, then check what a client can negotiate.

Added Updated

How this works

Pick an answer above to start. Each combination has its own page with one complete config, so you never have to assemble pieces. You can change any answer from that page.

Start here if you're not sure:

The four questions

  • Which server? We ran every nginx and Caddy combination and checked what a client could negotiate. Apache and HAProxy are built from their documentation and marked untested.
  • Which TLS versions? Choose TLS 1.3 only unless you can name a client that needs TLS 1.2. See protocol versions.
  • Which certificates? ECDSA P-384 alone suits almost everyone. Add RSA 3072 only for old clients that can't use ECDSA. Caddy manages one certificate per site, so it has no two-certificate option. See certificate strength.
  • HSTS for subdomains too? Say yes only when every subdomain serves HTTPS. See HSTS.

What every config has in common

These are not choices, because the rest of this site argues for them:

What "tested" means here

For each nginx and Caddy combination we started the server with that exact config and test certificates, then checked that:

  • the hybrid group negotiates, and X25519-only and P-384-only clients connect;
  • a P-256-only client is refused;
  • TLS 1.2 is refused or accepted as chosen, and never with static RSA, 3DES, RC4 or CBC suites;
  • the right certificate is served, including the RSA one to a client that can't use ECDSA;
  • the three headers arrive on a normal page and on a 404;
  • plain HTTP redirects to HTTPS.

The script that does this is tools/test-configs.mjs in the site's repository. It does not test with real browsers or old devices, so check against your own clients before you ship.

Sources

  1. nginx: ngx_http_ssl_module fetched
  2. Caddy: tls directive fetched
  3. Apache: mod_ssl fetched
  4. HAProxy configuration manual fetched
  5. TLS configuration guidelines (formerly Mozilla Server Side TLS) fetched

Changelog