All SSL articles SSL & Certificates

SSL/TLS Best Practices for 2026

SSL/TLS configuration has changed significantly. This is the current state of best practices as of 2026 — what to enable, what to disable, and what’s coming.

Protocol versions

ProtocolStatusAction
SSL 2.0, 3.0BrokenDisable — critical vulnerabilities (POODLE, DROWN)
TLS 1.0Deprecated (2021)Disable — BEAST vulnerability
TLS 1.1Deprecated (2021)Disable — no modern cipher support
TLS 1.2SecureEnable — with AEAD ciphers only
TLS 1.3Current standardEnable — fastest, most secure

Nginx: ssl_protocols TLSv1.2 TLSv1.3; Apache: SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1

Cipher suites

TLS 1.3 (no configuration needed)

All 5 cipher suites are secure. Don’t try to customize — you can’t make it better.

TLS 1.2 (restrict to AEAD only)

# Nginx
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256';
ssl_prefer_server_ciphers off;

Rules:

  • Only ECDHE-* suites — ensures forward secrecy
  • Only *-GCM-* or *-CHACHA20-* — AEAD ciphers only
  • No CBC ciphers — vulnerable to BEAST, Lucky13
  • ssl_prefer_server_ciphers off — let the client choose (modern clients pick the best option)

Certificate management

PracticeWhy
Use ECDSA P-256 keysSmaller, faster than RSA 2048
Automate renewal47-day validity by 2029 makes manual renewal impractical
Serve fullchain.pemPrevents chain of trust errors
Monitor certificate expirySet alerts for day 60 of 90
Use Certificate Transparency monitoringCatch unauthorized certificates
Rotate keys on renewalDon’t reuse private keys across certificates

Security headers

# HSTS — always use HTTPS (start with short max-age, increase later)
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;

# Prevent MIME-type sniffing
add_header X-Content-Type-Options "nosniff" always;

# Prevent clickjacking
add_header X-Frame-Options "SAMEORIGIN" always;

# Upgrade insecure sub-resources
add_header Content-Security-Policy "upgrade-insecure-requests" always;

HSTS deep dive →

Performance optimization

SettingConfigBenefit
HTTP/2listen 443 ssl http2;Multiplexing, header compression
Session cachingssl_session_cache shared:SSL:10m;Avoids re-handshake for returning visitors
Session tickets offssl_session_tickets off;Better forward secrecy
OCSP staplingssl_stapling on;Faster cert verification, better privacy
Early data (0-RTT)TLS 1.3 defaultZero-latency resumption (use cautiously)

Complete Nginx config (production-ready)

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name example.com www.example.com;

    ssl_certificate     /etc/ssl/fullchain.pem;
    ssl_certificate_key /etc/ssl/privkey.pem;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256';
    ssl_prefer_server_ciphers off;

    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 1d;
    ssl_session_tickets off;

    ssl_stapling on;
    ssl_stapling_verify on;
    resolver 8.8.8.8 8.8.4.4 valid=300s;

    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header X-Frame-Options "SAMEORIGIN" always;

    root /var/www/html;
}

server {
    listen 80;
    listen [::]:80;
    server_name example.com www.example.com;
    return 301 https://$host$request_uri;
}

Test: Paste your domain at SSL Labs — this config should score A+.

What NOT to do

Bad practiceWhyWhat to do instead
ssl_protocols TLSv1 TLSv1.1;Deprecated, vulnerableTLS 1.2 + 1.3 only
ssl_ciphers ALL;Includes weak ciphersExplicit ECDHE + AEAD list
ssl_prefer_server_ciphers on; (TLS 1.3)Unnecessary — TLS 1.3 ciphers are all secureoff
Using cert.pem instead of fullchain.pemMissing chain → trust errorsAlways fullchain.pem for Nginx
Self-signed certs in productionBrowser warnings, no trustLet’s Encrypt (free)
Same private key for yearsLimits damage containmentRotate on each renewal
No HSTSVulnerable to downgrade attacksEnable after testing
max-age=0 for HSTSEffectively disables HSTSStart at 300, increase to 63072000

Frequently asked questions

How do I test my SSL configuration?

SSL Labs Server Test — enter your domain, get a detailed report with a letter grade (A-F). Check protocol support, cipher strength, chain validity, and known vulnerabilities.

What grade should I target?

A+ for production sites. This requires: TLS 1.2+ only, AEAD ciphers, valid chain, HSTS with long max-age. The config above achieves A+.

How often should I review my SSL config?

Annually, or when a new vulnerability is announced. Subscribe to Let’s Encrypt’s status page and follow the Mozilla SSL Configuration Generator for updated recommendations.

Is there a tool that generates the right config for me?

Yes — Mozilla SSL Configuration Generator. Select your server (Nginx, Apache, etc.), your server version, and it generates a recommended config. The “Modern” profile matches the practices in this article.

Related articles

SSL & Certificates 2026-05-08
What is TLS 1.3? Everything That Changed
TLS 1.3 is the current encryption standard — faster handshake, mandatory forward secrecy, no legacy algorithms. Learn what changed from TLS 1.2, how to enable it, and whether you should force it.
SSL & Certificates 2026-05-08
What is Forward Secrecy (Perfect Forward Secrecy)?
Forward secrecy means every TLS connection uses a unique key. Even if your server's private key is compromised, past conversations can't be decrypted. Learn how it works and how to ensure it's enabled.
SSL & Certificates 2026-05-08
HSTS: HTTP Strict Transport Security Explained
HSTS tells browsers to always use HTTPS. Learn how to configure HSTS, what max-age to use, when to add preload, and the risks of getting it wrong.
Deployment 2026-05-08
How to Install an SSL Certificate on Nginx
Step-by-step guide to installing an SSL certificate on Nginx. Covers file upload, full server block config, TLS best practices, HTTP/2, HSTS, redirect setup, testing, and troubleshooting 6 common errors.
Get a free SSL certificate in your browser
No installation, no account. Your private key never leaves your device.
Get your certificate