
Introduction
A secure TLS configuration in 2026 means TLS 1.2 and 1.3 only, a short list of forward-secret ciphers, HSTS, and automated certificate renewal. This guide gives copy-ready settings for Nginx and Apache HTTP Server, based on the TLSRef (formerly Mozilla) guidelines, IETF RFCs and the vendor documentation.
Two things changed this year. Public certificates are now limited to 200 days, and that limit keeps shrinking. NIST also announced on November 19, 2026, that it will revise its TLS guidance. Everything below is checked as of November 30, 2026.
Key Facts: TLS Configuration at a Glance
- Protocols: allow TLS 1.2 and TLS 1.3. RFC 8996 deprecated TLS 1.0 and 1.1, and RFC 9325 says implementations must not negotiate them.
- Profile: TLSRef’s “Intermediate” profile (version 6.0) is the recommended default. “Modern” allows TLS 1.3 only.
- Ciphers: only ECDHE key exchange with AES-GCM or ChaCha20-Poly1305. Let the client choose the order.
- HSTS: TLSRef recommends
max-age=63072000(two years). Roll it out in stages. - Certificates: the maximum validity is 200 days since March 15, 2026, then 100 days from March 15, 2027 and 47 days from March 15, 2029 (CA/Browser Forum).
- Action: pin protocols and ciphers explicitly, test from outside, and automate renewal before the limit drops again.
What Is the Safest TLS Configuration for a Web Server?
The safest general-purpose TLS configuration is TLSRef’s Intermediate profile. It supports TLS 1.2 and 1.3, which covers nearly every client released in the last five years, according to TLSRef. TLSRef continues the Mozilla Server Side TLS guidelines, which moved to a community working group project.
| Setting | Intermediate (recommended) | Modern |
|---|---|---|
| Protocols | TLS 1.2, TLS 1.3 | TLS 1.3 only |
| Certificate | ECDSA P-256 (recommended) or RSA 2048 | ECDSA P-256 |
| TLS curves | X25519MLKEM768, X25519, prime256v1, secp384r1 | same |
| HSTS | max-age=63072000 | max-age=63072000 |
| Oldest clients | Firefox 31.3, Chrome 49, Java 8u161, OpenSSL 1.0.1l | Firefox 63, Chrome 70, Java 11, OpenSSL 1.1.1 |
Choose Modern only if you know that every client speaks TLS 1.3. For public websites, Intermediate is the safer choice.
Why Should You Turn Off TLS 1.0 and 1.1?
You should turn them off because the IETF deprecated both versions in RFC 8996 (March 2021). They lack modern algorithms. RFC 9325 (BCP 195, November 2022) states that implementations must not negotiate TLS 1.0 or 1.1, must support TLS 1.2, and should support TLS 1.3 and prefer it.
Check your defaults, because they differ by server:
| Server | Documented default | What to do |
|---|---|---|
| Nginx | ssl_protocols TLSv1.2 TLSv1.3 (TLS 1.3 included by default since 1.23.4) | Set it explicitly anyway |
| Apache HTTP Server | SSLProtocol all -SSLv3 | Replace with an explicit TLS 1.2 and 1.3 list |
On Apache, all still includes TLS 1.0 and 1.1 when the OpenSSL library supports them. Your distribution may tighten this, but do not rely on it.
How Do You Configure TLS in Nginx?
Set the protocols, the TLS 1.2 cipher list and session handling in the server block. The ciphers below are TLSRef’s Intermediate list for TLS 1.2. TLS 1.3 suites are set separately: TLSRef lists three, and Nginx documents ssl_conf_command Ciphersuites if you must change them.
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com;
ssl_certificate /etc/ssl/example.com/fullchain.pem;
ssl_certificate_key /etc/ssl/example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1d;
ssl_session_tickets off;
add_header Strict-Transport-Security "max-age=63072000" always;
}Notes on these settings:
ssl_prefer_server_ciphers offlets the client choose, as TLSRef recommends. It is also the Nginx default.- Nginx documents
ssl_session_ticketsas on by default. Turning it off avoids ticket-key management. If you keep tickets, RFC 9325 requires regular key rotation, for example weekly. - Leave
ssl_early_dataoff unless you accept replay risk. See our article on Nginx CVE-2026-132779 and ssl_early_data. - Leave
ssl_ecdh_curveatauto. OpenSSL 3.5 documents X25519MLKEM768, a hybrid post-quantum group, in its default list.
How Do You Configure TLS in Apache HTTP Server?
Use mod_ssl directives with an explicit protocol list. The cipher list is the same TLSRef Intermediate set. Apache lets you set TLS 1.3 suites with the TLSv1.3 protocol specifier on OpenSSL 1.1.1 or later.
SSLProtocol -all +TLSv1.2 +TLSv1.3
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305
SSLHonorCipherOrder off
SSLSessionTickets off
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=63072000"
</IfModule>The Apache documentation warns that session tickets, which are on by default, compromise perfect forward secrecy unless the server restarts regularly, for example daily. Disabling them is the simpler option. If you run Apache, keep the server current with our Apache HTTP Server 2.4.71 security update guide.
How Do You Roll Out HSTS Safely?
Start with a short max-age, confirm that every subdomain serves HTTPS, then raise it in stages. TLSRef recommends two years in its final profile, but a wrong HSTS header can lock users out of a broken site. Our HTTP security headers guide describes the staged plan and the preload requirements. RFC 6797 defines the header.
How Can You Check Whether Your TLS Configuration Is Correct?
Test from a machine outside your network and compare the result with the table above. Run these checks only against servers you own.
# Negotiated protocol and certificate dates
openssl s_client -connect example.com:443 -servername example.com -brief </dev/null
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates
# TLS 1.2 should work; an old protocol should fail
curl -sSI --tlsv1.2 --tls-max 1.2 https://example.com/ | head -n 1
openssl s_client -connect example.com:443 -servername example.com -tls1_1 </dev/nullThe last command can also fail because your local OpenSSL refuses TLS 1.1, so treat it as a hint. For a full report, use the open-source testssl.sh (latest release v3.2.5 on November 4, 2026) or the Nmap ssl-enum-ciphers script. Both are linked in the references.
Why Does Automated Certificate Renewal Matter Now?
It matters because certificate lifetimes are shrinking on a fixed schedule. The CA/Browser Forum Baseline Requirements limit subscriber certificates to 200 days for those issued from March 15, 2026. The limit becomes 100 days on March 15, 2027 and 47 days on March 15, 2029.

Let’s Encrypt is moving faster than the minimum. Its published plan schedules:
- May 13, 2026: the opt-in
tlsserverprofile switches to 45-day certificates. - February 10, 2027: the default
classicprofile switches to 64-day certificates. - February 16, 2028: the
classicprofile moves to 45-day certificates.
Let’s Encrypt advises ACME clients to use ACME Renewal Information (ARI, RFC 9773) or renew at about two thirds of the certificate lifetime. A fixed 60-day renewal interval will no longer be enough. Also add monitoring that alerts when a certificate is close to expiry.
Let’s Encrypt also announced the end of OCSP: its timeline turned off the OCSP responders on August 6, 2025, and dropped OCSP URLs from certificates on May 7, 2025. TLSRef’s JSON still lists OCSP stapling as enabled. In practice, ssl_stapling in Nginx and SSLUseStapling in Apache (both off by default) only help if your CA still publishes OCSP. Check with your CA before you enable them.
What Is Changing in TLS Standards?
Standards are moving towards TLS 1.3. The IETF published RFC 9846 in July 2026. It obsoletes RFC 8446 (TLS 1.3) and RFC 5246 (TLS 1.2) and sets new requirements for TLS 1.2 implementations.
On November 19, 2026, NIST added a planning note to SP 800-52 Rev. 2. It says the next revision will recommend that servers “may” support TLS 1.2, instead of “should”, and will not generally allow TLS 1.0 or 1.1. NIST will publish a draft SP 800-52r3 for public comment. Until then, Rev. 2 remains the current publication. If you serve government or regulated customers, watch that draft.
Additional TLS Security Recommendations
- Prefer ECDSA P-256 certificates, as TLSRef recommends, or RSA 2048 if you need broad compatibility.
- Keep OpenSSL and your web server patched. See our Nginx security update article for a recent example.
- Redirect HTTP to HTTPS, then add HSTS. Keep private keys readable by root only.
- Do not re-enable DHE-RSA ciphers. TLSRef removed them from Intermediate because they cost more CPU and are more exposed to resource exhaustion, such as the D(HE)at attack (CVE-2002-20001).
- Re-check after every OpenSSL, Nginx or Apache upgrade.
FAQ
What is the best TLS configuration for Nginx and Apache?
Use TLS 1.2 and 1.3, the six ECDHE cipher suites from TLSRef’s Intermediate profile, a 90-day automated certificate and HSTS. The Nginx and Apache blocks above implement this.
Is TLS 1.2 still secure in 2026?
Yes, when configured with forward-secret AEAD ciphers. RFC 9325 still requires TLS 1.2 support. The direction is TLS 1.3, and NIST plans to make TLS 1.2 optional in its next revision.
Should I disable TLS 1.2 and use TLS 1.3 only?
Only if all your clients support TLS 1.3. TLSRef’s Modern profile does that, with Firefox 63, Chrome 70 or newer clients. Most public sites keep TLS 1.2.
Do I need OCSP stapling?
Not necessarily. Let’s Encrypt ended OCSP, so stapling is of little use for its certificates. Enable stapling only if your CA still provides an OCSP responder.
How often should I renew TLS certificates?
Automate renewal at about two thirds of the certificate lifetime, or use ARI. With 200-day certificates today and 47-day certificates by 2029, manual renewal will not scale.
References
- RFC 9325: Recommendations for Secure Use of TLS and DTLS (BCP 195)
- RFC 8996: Deprecating TLS 1.0 and TLS 1.1
- RFC 9846: The TLS Protocol Version 1.3
- RFC 6797: HTTP Strict Transport Security
- RFC 9773: ACME Renewal Information (ARI)
- TLSRef: Server-Side TLS guidelines
- NIST SP 800-52 Rev. 2 and revision planning note
- CA/Browser Forum Baseline Requirements
- Let’s Encrypt: Decreasing Certificate Lifetimes to 45 Days
- Let’s Encrypt: Ending OCSP Support in 2025
- Nginx ngx_http_ssl_module documentation
- Apache mod_ssl documentation
- OpenSSL 3.5: supported TLS groups
- OpenSSL s_client manual
- testssl.sh on GitHub
- Nmap ssl-enum-ciphers script
Related Articles
- HTTP Security Headers: What to Set, How to Configure Them and How to Test
- Nginx CVE-2026-132779: ssl_early_data CPU Flaw Fixed in 1.30.8 and 1.31.10
- Nginx Security Update: 1.30.7 and 1.31.9 Fix 10 CVEs
- Apache HTTP Server 2.4.71: Patch mod_http2 CVE-2026-119618
- How to Secure Your Ubuntu Server: A Beginner-Friendly Guide
Last Verified: November 30, 2026. Facts come from the sources above. Check your own OpenSSL, Nginx and Apache versions before you apply the settings.