What Is a Cipher Suite and Which to Use
A cipher suite is the named bundle of algorithms a client and server agree on during the TLS handshake. It decides how keys are exchanged, how the server proves its identity, and how the data is encrypted and checked for tampering. On a current server you rarely need to choose one by hand: enable TLS 1.3 and let the defaults do the work.
Reading a cipher suite name
A TLS 1.2 name packs four choices into one string:
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
| | | |
| | | +-- hash for key derivation
| | +----------- bulk encryption and mode
| +------------------------ certificate signature type
+------------------------------ key exchange
So this suite uses ephemeral elliptic curve Diffie-Hellman for key exchange, an ECDSA certificate, AES-256 in Galois/Counter Mode for encryption, and SHA-384. TLS 1.3 shortens the names, for example TLS_AES_256_GCM_SHA384, because key exchange and signatures are negotiated separately.
TLS 1.3 cipher suites
TLS 1.3 defines only a small set of suites, all of which use authenticated encryption and forward secrecy:
| Suite | Notes |
|---|---|
| TLS_AES_128_GCM_SHA256 | Fast on hardware with AES acceleration |
| TLS_AES_256_GCM_SHA384 | Larger key, slightly slower |
| TLS_CHACHA20_POLY1305_SHA256 | Fast on devices without AES hardware, such as some phones |
There is little to tune here. Enable TLS 1.3 and the defaults of a current server are sound.
Choosing cipher suites for TLS 1.2
For TLS 1.2 you do have a choice. Prefer these traits:
- ECDHE key exchange, for forward secrecy.
- AES-GCM or ChaCha20-Poly1305 encryption, which are AEAD modes.
- Avoid RC4, 3DES, export ciphers, NULL and anonymous suites, and static RSA key exchange.
- Avoid CBC modes where you can. They have a history of padding attacks.
Mozilla publishes an SSL configuration generator with "modern" and "intermediate" profiles. Use it as the source for your current list and re-check it from time to time, because recommendations move.
Example server settings
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;
ssl_prefer_server_ciphers off;
This is an Nginx sketch, with the cipher list shortened over several lines for display. Put the list on one line in a real file. It controls TLS 1.2 only. TLS 1.3 suites are managed separately by the library.
Cipher suite and certificate type
The certificate key type limits the options. An ECDSA certificate works with ECDSA suites, an RSA certificate with RSA suites. Many servers can hold both. The tradeoffs are covered in ECDSA versus RSA certificates.
Check which cipher suites your server offers
nmap --script ssl-enum-ciphers -p 443 example.com
openssl s_client -connect example.com:443 \
-cipher ECDHE-RSA-AES128-GCM-SHA256 -tls1_2
The first command lists every supported suite with a grade. The second tests one suite. You can also run the browser-based cipher suite checker. If browsers show errors, see fixing ERR_SSL_VERSION_OR_CIPHER_MISMATCH.
Keep the list short, drop anything weak, and revisit it when you upgrade your web server or its TLS library.
Mistakes to avoid
- Copying a cipher list from an old tutorial. Lists age fast. Generate a current one from a maintained source.
- Disabling TLS 1.2 because TLS 1.3 exists. Many clients and tools still need 1.2.
- Setting a very short list that excludes every suite an older but supported client offers.
- Forgetting that CDNs and load balancers have their own cipher settings, separate from your origin.
After any change, test from outside, with a scanner and with a real older device if you support one. A suite that looks fine in a config file can still fail in practice because of the library's build options.
For related reading, see how to disable TLS 1.0 and 1.1 and what perfect forward secrecy is.
Why defaults are usually best
Web server and TLS library maintainers update default settings as attacks appear. If you accept the defaults of a current release and keep it patched, you inherit that work. Hand-tuned lists tend to go stale, and stale lists are how weak suites linger in production for years. Only customize when a compliance rule or a client requirement forces you to, and write down why, so the next person knows whether it is still needed.
A good habit is to re-run a scanner once a quarter and after every major upgrade of your server software.
Related reading: TLS 1.2 vs TLS 1.3 and SSL vs TLS vs HTTPS.
Frequently Asked Questions
Which cipher suite should I use?
On TLS 1.3 you do not pick one: the set is fixed by the library and the defaults are sound. On TLS 1.2, prefer ECDHE key exchange with AES-GCM or ChaCha20-Poly1305.
Are CBC cipher suites unsafe?
They have a long history of padding attacks. AEAD modes avoid that class of bug, so keep CBC only where an old client forces it.
Why does my server ignore my cipher list?
The list usually applies to TLS 1.2 only. TLS 1.3 suites are fixed by the library and are not set by the same directive.
How do I check which suites my site offers?
Run a scanner such as nmap's ssl-enum-ciphers script or a browser-based checker, then repeat the check after any server upgrade.
Do I need to change anything for the shorter certificate lifetimes?
No. Cipher suites do not change with lifetime. Renewal has to run more often, which is an automation question, not a cipher question.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.