Best Practices for SSL/TLS Server Configuration
A guide to hardening your web server SSL/TLS settings for maximum security.
Configuring SSL/TLS on a web server (like NGINX, Apache, or HAProxy) is critical for securing data in transit. However, simply installing a certificate is not enough; the protocol settings and cipher suites must be hardened.
1. Disable Old Protocols
SSLv2, SSLv3, TLS 1.0, and TLS 1.1 are entirely deprecated due to numerous cryptographic vulnerabilities (like POODLE and BEAST).
Best Practice: Only enable TLS 1.2 and TLS 1.3.
# NGINX Example
ssl_protocols TLSv1.2 TLSv1.3;
2. Use Strong Cipher Suites
A cipher suite is a set of algorithms that help secure a network connection. You must configure your server to prioritize strong ciphers that support Forward Secrecy (FS) and disable weak or broken ciphers (like RC4, DES, or anything using MD5).
Forward Secrecy ensures that if your server's private key is compromised in the future, past recorded traffic cannot be decrypted.
Best Practice: Prioritize ECDHE (Elliptic Curve Diffie-Hellman Ephemeral) key exchange and AEAD (Authenticated Encryption with Associated Data) ciphers like AES-GCM or ChaCha20-Poly1305.
3. Enable HTTP Strict Transport Security (HSTS)
HSTS is an HTTP header that tells browsers to only interact with your server over HTTPS, never via insecure HTTP. This protects against downgrade attacks.
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
4. Automate Certificate Renewal
Let's Encrypt provides free, automated certificates valid for 90 days. You should use tools like certbot to automate the renewal process so your certificates never expire unexpectedly.
You can generate an optimized, secure web server configuration using our SSL Config Generator.