- Put
ssl_protocols TLSv1.2 TLSv1.3;in thehttpblock ofnginx.conf, delete every otherssl_protocolsline, then reload. - On nginx 1.28 and older, the default server of a port decides the protocols for every site on that port. An
ssl_protocolsline in your ownserverblock is ignored. Each server applies its own value since nginx 1.29.2. - With OpenSSL 3, TLS 1.0 and 1.1 only work when
ssl_ciphersends in@SECLEVEL=0. Remove it, or TLS 1.0 can stay on even after you fixssl_protocols. - WebSec0 caps the TLS grade at C while TLS 1.0 or 1.1 is offered. Disabling both lifts the cap and raises the protocol score from 85 to 97.
- Test with
openssl s_client -tls1 -cipher 'DEFAULT:@SECLEVEL=0'. Without the cipher option, OpenSSL 3 refuses TLS 1.0 on its own side and the test always looks clean.
How do I disable TLS 1.0 and 1.1 on Nginx?
Set ssl_protocols TLSv1.2 TLSv1.3; once, in the http block of
nginx.conf, and remove every other ssl_protocols line. Then reload Nginx
and test with openssl. A line in your own server block is not enough on
nginx 1.28 and older.
# /etc/nginx/nginx.conf, inside the http { } block
ssl_protocols TLSv1.2 TLSv1.3;If ssl_ciphers ends in @SECLEVEL=0 anywhere in your configuration, remove
that too. The sections below explain both, with the results of each case on
real servers.
Why disable TLS 1.0 and 1.1?
The IETF deprecated both versions in 2021 with RFC 8996. They lack the modern algorithms of TLS 1.2 and 1.3, and various government and industry profiles already required avoiding them.
Browsers dropped them first. Chrome shows a full-page error for sites without TLS 1.2 since Chrome 84, and the error cannot be bypassed since Chrome 98, according to Chrome Platform Status.
Turning them off only affects very old clients. Mozilla’s intermediate profile, TLS 1.2 and 1.3 only, lists Android 4.4.2, Chrome 49, Firefox 31.3, Safari 9, Internet Explorer 11 on Windows 10 and Java 8u161 among its oldest supported clients.
How WebSec0 grades TLS 1.0 and 1.1
WebSec0 opens one handshake per version, from TLS 1.3 down to TLS 1.0, and sends your host name in SNI. A version is offered when its handshake succeeds. SSL 2.0 and 3.0 are tested separately.
When TLS 1.0 or 1.1 is offered, the TLS grade is capped at C, however high the score. The report shows “Deprecated TLS versions enabled” and, under the grade, “Capped at C · TLS 1.0 offered”. SSL 2.0 or 3.0 caps it at F.
The protocol score is the average of the best and the worst version offered:
| Versions offered | Protocol score | Grade cap |
|---|---|---|
| TLS 1.0 to 1.3 | 85 | C |
| TLS 1.1 to 1.3 | 90 | C |
| TLS 1.2 and 1.3 | 97 | None |
| TLS 1.3 only | 100 | None |
The TLS score is 30% certificate and 70% the average of the protocol,
key-exchange and cipher scores. Once the cap is gone, an A+ also needs
Strict-Transport-Security with a max-age of at least one year and
includeSubDomains, set as in the HSTS guide for Nginx.
Where does TLS 1.0 still come from?
Three things decide whether Nginx accepts TLS 1.0: the Nginx version, the
ssl_protocols line and the OpenSSL security level. We ran each case in the
official nginx Docker images and probed it the way WebSec0 does:
| Setup | TLS 1.0 and 1.1 |
|---|---|
nginx 1.22 image (OpenSSL 1.1.1), no ssl_protocols |
Offered |
nginx 1.28 to 1.31 images (OpenSSL 3.5), no ssl_protocols |
Disabled |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; with OpenSSL 3 |
Disabled |
The same with ssl_ciphers "…:@SECLEVEL=0"; |
Offered |
| Ubuntu 24.04 and Debian 12 packages, as installed | Disabled |
Nginx has changed its default twice. TLS 1.3 is enabled by default since nginx 1.23.4, and TLS 1.0 and 1.1 are disabled by default since 1.27.3, according to the nginx changelog.
OpenSSL 3 refuses TLS 1.0 and 1.1 at every security level except 0, as its
security level documentation
states. That is why the old ssl_protocols line that Ubuntu 24.04 and Debian 12
ship in nginx.conf is harmless on its own. Some configurations append
@SECLEVEL=0 to ssl_ciphers to keep TLS 1.0 for old clients, and that is
what turns it on again.
If a CDN or load balancer terminates TLS in front of Nginx, WebSec0 sees its settings, not Nginx’s. Set the minimum TLS version there.
Find every ssl_protocols line
nginx -T prints the whole configuration, with every included file. Search it
for the lines that matter:
sudo nginx -T 2>/dev/null | grep -nE "ssl_protocols|SECLEVEL|listen .*443"Note which server block has default_server on its listen 443 line. If
none does, the first one Nginx loads for that port is the default server.
Why a server block is not enough
On nginx 1.28 and older, ssl_protocols in a server block that is not the
default server for its port has no effect on the TLS version: Nginx uses the
default server’s value instead. The ssl_protocols documentation
warns that the value from the default server can be used. Nginx 1.29.2 fixed
this for OpenSSL 1.1.1 and later.
We tested it with two sites on port 443. The default server, other.example,
inherited TLSv1 TLSv1.1 TLSv1.2 TLSv1.3 and @SECLEVEL=0 from the http
block. example.com set ssl_protocols TLSv1.2 TLSv1.3; in its own block:
Probe of example.com |
1.26 and 1.28 | 1.30 and 1.31 |
|---|---|---|
ssl_protocols in the server block |
TLS 1.0 offered | TLS 1.0 disabled |
ssl_protocols in the http block |
TLS 1.0 disabled | TLS 1.0 disabled |
This affects every version before 1.29.2, including the 1.28 stable branch.
nginx -t gave no warning in any of these cases. Setting the line once in the
http block works on every version.
Remove @SECLEVEL=0 from ssl_ciphers
With OpenSSL 3, @SECLEVEL=0 at the end of ssl_ciphers turns TLS 1.0 and
1.1 back on for any version ssl_protocols allows. If the old
ssl_protocols line is still in place anywhere, it is offered again:
# Before: TLS 1.0 and 1.1 work again with OpenSSL 3
ssl_ciphers "HIGH:!aNULL:!MD5:@SECLEVEL=0";
# After
ssl_ciphers "HIGH:!aNULL:!MD5";HIGH:!aNULL:!MD5 is the Nginx default, so you can also delete the line.
This step only removes the security level override. The default list still
offers static RSA and CBC suites that WebSec0 flags as weak; the
TLS cipher suites guide gives a list without them.
Reload and test the result
Check the configuration, then reload:
sudo nginx -t && sudo systemctl reload nginxThen try a TLS 1.0 handshake. Run the command on a machine with OpenSSL 3,
such as the Nginx server itself, and replace example.com with your host. The
openssl that ships with macOS is LibreSSL and does not accept -brief.
openssl s_client -connect example.com:443 -servername example.com -tls1 -cipher 'DEFAULT:@SECLEVEL=0' -brief </dev/nullA server that still accepts TLS 1.0 completes the handshake:
CONNECTION ESTABLISHED
Protocol version: TLSv1
Ciphersuite: ECDHE-RSA-AES256-SHAA server with TLS 1.0 disabled answers with a protocol version alert:
error:0A00042E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol versionRepeat with -tls1_1 instead of -tls1, then with -tls1_2 to make sure
TLS 1.2 still works.
Keep -cipher 'DEFAULT:@SECLEVEL=0'. Without it, OpenSSL 3 refuses to send a
TLS 1.0 handshake at all and prints no protocols available, even when the
server would accept one. That error says nothing about your server.
In the WebSec0 report, the “Protocol support” card should now show TLS 1.0 and TLS 1.1 as disabled, with no C cap under the TLS grade.
Questions
Frequently asked questions
Where do I put ssl_protocols in Nginx?
In the http block of /etc/nginx/nginx.conf, once. Every server block inherits it. A line in a server block only works on nginx 1.29.2 and later, or when that server is the default server for its port.
Why does my site still accept TLS 1.0 after I changed ssl_protocols?
Either another server block is the default server for port 443 and still allows TLS 1.0 (nginx 1.28 and older use its value for every site on the port), or Nginx was not reloaded, or a CDN or load balancer in front of Nginx handles TLS. Run sudo nginx -T to see every ssl_protocols line and listen directive.
Does Nginx enable TLS 1.0 by default?
Not since nginx 1.27.3, where the default became TLSv1.2 TLSv1.3. Older versions enable TLS 1.0 and 1.1 by default. With OpenSSL 3, the library still refuses them unless ssl_ciphers sets @SECLEVEL=0.
Should I keep only TLS 1.3?
ssl_protocols TLSv1.3; raises the WebSec0 protocol score from 97 to 100; neither setting has a grade cap. Mozilla's modern profile does this, and its oldest supported clients are Android 10, Chrome 70, Firefox 63 and Safari 12.1. TLS 1.2 and 1.3 together is the safe default.
Ubuntu's nginx.conf lists TLSv1. Is my server offering TLS 1.0?
Probably not. Ubuntu 22.04 and 24.04 and Debian 12 ship ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; in nginx.conf. In our test, Ubuntu 24.04 and Debian 12 still offered only TLS 1.2 and 1.3, because OpenSSL 3 refuses older versions unless ssl_ciphers sets @SECLEVEL=0. Change the line anyway, so the configuration says what the server does.
Will disabling TLS 1.0 and 1.1 break browsers?
No. Chrome shows a full-page error for sites without TLS 1.2 since Chrome 84, and the error cannot be bypassed since Chrome 98. Mozilla's TLS 1.2 and 1.3 profile still supports clients as old as Android 4.4.2, Safari 9 and Java 8u161.
References
Sources
- Configuring HTTPS serversnginx.org
- Remove TLS 1.0 and TLS 1.1Chrome Platform Status
