Skip to content

TLS Config Generator

Secure TLS settings for nginx, Apache, HAProxy or IIS, following Mozilla's guidelines: protocols, ciphers, post-quantum key exchange, HSTS.

Copy-paste TLS settings for nginx, Apache, HAProxy or IIS that follow Mozilla's Server Side TLS guidelines (version 6.0): the protocols, ciphers and key exchange groups to allow, HSTS, and redirecting plain HTTP. Pick "intermediate" unless you know every client supports TLS 1.3. Afterwards, check the result with the TLS Certificate Checker and Security Headers.

Host name

Configuration

980 characters · 980 bytes UTF-8
nginx before 1.25.1: drop "http2 on;" and write "listen 443 ssl http2;" instead.
The TLS 1.3 cipher suites are left at OpenSSL's defaults, which are the three Mozilla recommends; nginx's ssl_ciphers only affects TLS 1.2.
Test with nginx -t before reloading (nginx -s reload or systemctl reload nginx).
HSTS makes browsers refuse plain HTTP to this host for two years. Turn it on only when HTTPS works everywhere on it; start with a short max-age (300) if you're unsure, and add includeSubDomains only when every subdomain has HTTPS too.