SSL Security Best Practices: TLS 1.3, HSTS, OCSP Stapling & Keys

SSL Security Best Practices
The core of protecting a site is: serve TLS 1.3 (and deprecate anything older than TLS 1.2 as analytics allow), enable HSTS to force HTTPS, turn on OCSP stapling for privacy and latency, protect the private key, and automate renewal. With SC-081v3 shrinking public-certificate validity to 200→100→47 days (CA/B Forum, 2025), automated renewal is no longer optional.
Protocols: modern only
Enable TLS 1.3 and TLS 1.2, and disable everything older — SSLv3, TLS 1.0, and TLS 1.1 are all broken or deprecated (mainstream browsers finished deprecating them by the end of 2020). Roughly 80% of top sites already support TLS 1.3 (TLS 1.2 Deprecation 2026, 2026-08), so enabling it costs almost no compatibility. Once logs show no TLS 1.2 traffic, drop it too. In Nginx set ssl_protocols TLSv1.2 TLSv1.3; in Apache SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1.
Cipher suites and forward secrecy
Use modern AEAD ciphers such as TLS_AES_256_GCM_SHA384 and prefer ECDHE or DHE key exchange for forward secrecy. With TLS 1.3, forward secrecy is mandatory and cipher choice is handled by the protocol, making this configuration mostly automatic.
HSTS
The Strict-Transport-Security header tells browsers to use HTTPS only for your domain, preventing downgrade and cookie-hijacking attacks. Start with max-age=31536000; includeSubDomains; preload, then submit your domain to the HSTS preload list so protection is hardcoded into browsers. Caution: includeSubDomains plus preload commits every subdomain to HTTPS — a subdomain that cannot serve TLS becomes unreachable, and removal from the preload list takes months.
OCSP stapling
Stapling lets your server attach a timestamped proof of certificate validity to the handshake, removing a separate OCSP request for every visitor and improving both privacy and latency. Enable it in Nginx with ssl_stapling on and verify with the SSL/TLS Tracer. Note: Let's Encrypt shut down its OCSP service on 2025-08-06, so stapling availability depends on each CA's policy — pair it with CRL and Certificate Transparency monitoring.
Key protection and renewal
Store private keys with 600 permissions, never share them, and rotate them on every renewal. Automate renewal with an ACME client to keep pace with the shrinking validity. After each change, run the SSL Checker to confirm the configuration is still healthy.
Step 1: Tighten protocols and ciphers
In your server config, enable only TLS 1.2/1.3 with modern AEAD suites, and turn off SSLv3/TLS 1.0/1.1.
Step 2: Enable HSTS and preload
Return Strict-Transport-Security: max-age=31536000; includeSubDomains; preload, then submit to hstspreload.org once stable.
Step 3: Enable OCSP stapling and verify
Turn on stapling in Nginx/Apache and confirm it works with the SSL/TLS Tracer; also monitor Certificate Transparency logs.
Step 4: Automate renewal and key rotation
Use an ACME client such as certbot or caddy to auto-renew and rotate keys; re-check with the SSL Checker after each renewal, and set expiry alerts with the Certificate Expiry Monitor.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Old protocols still enabled | TLS 1.0/1.1 not disabled | Keep only TLS 1.2/1.3 |
| No HSTS protection | Header not set | Add Strict-Transport-Security and preload |
| OCSP stapling not working | Clock or DNS resolution issue | Fix the clock; confirm the OCSP responder is reachable |
| Private key leaked | Over-broad permissions or shared | Store at 600, rotate immediately and revoke |
| Certificate expired unexpectedly | Renewal not automated | Use an ACME client and monitor expiry |
| Downgrade attack risk | HTTPS not enforced | Enable HSTS and 301-redirect HTTP to HTTPS |
Next steps
- Verify protocols and configuration with the SSL Checker.
- Confirm OCSP stapling and handshakes with the SSL/TLS Tracer.
- Set renewal alerts with the Certificate Expiry Monitor.
- Browse the SSL certificate guide for certificate basics.
- Related: Common SSL Errors, SSL Certificate Guide 2026, RSA vs ECDSA.
FAQ
Is TLS 1.2 still acceptable?
For now it is the compatibility floor, but browsers will disable it by default in early 2027 (vendor roadmaps; no joint primary announcement published as of 2026-11). Upgrade to TLS 1.3 now and plan to drop TLS 1.2 after a transition.
Does HSTS slow down my site?
No. It only adds one small response header while eliminating insecure requests and an extra redirect for returning visitors.
How often should I rotate keys?
Under SC-081v3, a fresh key per renewal is the norm (validity falls to 47 days from 2029-03-15). Rotate immediately at any sign of key exposure.
Free SSL/TLS tools
Verify and inspect your certificates in seconds.
Related Certificate Info
Learn more about choosing and buying certificates.