सभी SSL articles SSL और Certificates

SSL/TLS Best Practices for 2026

SSL/TLS configuration में काफी बदलाव आए हैं। यह 2026 के हिसाब से best practices की current state है — क्या enable करें, क्या disable करें, और आगे क्या आने वाला है।

Protocol versions

ProtocolStatusAction
SSL 2.0, 3.0BrokenDisable करें — serious vulnerabilities (POODLE, DROWN)
TLS 1.0Deprecated (2021)Disable करें — BEAST vulnerability
TLS 1.1Deprecated (2021)Disable करें — कोई modern cipher support नहीं
TLS 1.2SecureEnable करें — सिर्फ AEAD ciphers के साथ
TLS 1.3Current standardEnable करें — सबसे fast, सबसे secure

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

Cipher suites

TLS 1.3 (कोई configuration जरूरी नहीं)

सभी 5 cipher suites secure हैं। Customize करने की कोशिश न करें — आप इसे better नहीं बना सकते।

TLS 1.2 (सिर्फ AEAD तक limit करें)

# 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:

  • सिर्फ ECDHE-* suites — forward secrecy ensure करता है
  • सिर्फ *-GCM-* या *-CHACHA20-* — only AEAD ciphers
  • कोई CBC ciphers नहीं — BEAST, Lucky13 के लिए vulnerable
  • ssl_prefer_server_ciphers off — client को choose करने दें (modern clients best option चुनते हैं)

Certificate management

Practiceक्यों
ECDSA P-256 keys use करेंRSA 2048 से छोटी, fast
Renewal automate करें2029 तक 47-day validity manual renewal को impractical बनाती है
fullchain.pem serve करेंChain of trust errors रोकता है
Certificate expiry monitor करें90 में से 60th day के लिए alerts set करें
Certificate Transparency monitoring use करेंunauthorized certificates पकड़ें
Renewal पर keys rotate करेंcertificates के बीच private keys reuse न करें

Security headers

# HSTS — हमेशा HTTPS use करें (छोटे max-age से start करें, बाद में बढ़ाएँ)
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;

# MIME-type sniffing रोकें
add_header X-Content-Type-Options "nosniff" always;

# Clickjacking रोकें
add_header X-Frame-Options "SAMEORIGIN" always;

# Insecure sub-resources upgrade करें
add_header Content-Security-Policy "upgrade-insecure-requests" always;

HSTS detailed guide →

Performance optimization

SettingConfigBenefit
HTTP/2listen 443 ssl http2;Multiplexing, header compression
Session cachingssl_session_cache shared:SSL:10m;Returning visitors के लिए re-handshake avoid करें
Session tickets offssl_session_tickets off;Better forward secrecy
OCSP staplingssl_stapling on;Fast cert verification, better privacy
Early data (0-RTT)TLS 1.3 defaultZero-latency resumption (carefully use करें)

Full 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 करें: अपना domain SSL Labs पर paste करें — इस config को A+ score मिलना चाहिए।

क्या न करें

Bad practiceक्योंइसकी जगह क्या करें
ssl_protocols TLSv1 TLSv1.1;Deprecated, vulnerableसिर्फ TLS 1.2 + 1.3
ssl_ciphers ALL;Weak ciphers include हैंExplicit ECDHE + AEAD list
ssl_prefer_server_ciphers on; (TLS 1.3)Unnecessary — TLS 1.3 ciphers सब secure हैंoff
fullchain.pem की जगह cert.pem use करनाchain missing → trust errorsNginx के लिए हमेशा fullchain.pem
Production में self-signed certsBrowser warnings, कोई trust नहींLet’s Encrypt (free)
सालों तक same private keyDamage containment limit करता हैहर renewal पर rotate करें
कोई HSTS नहींDowngrade attacks के लिए vulnerableTesting के बाद enable करें
HSTS के लिए max-age=0Effectively HSTS disable करता है300 से start करें, 63072000 तक बढ़ाएँ

FAQ

मैं अपनी SSL configuration कैसे test करूँ?

SSL Labs Server Test — अपना domain enter करें, letter grade (A-F) के साथ detailed report मिलेगी। Protocol support, cipher strength, chain validity, और known vulnerabilities check करें।

किस grade को target करना चाहिए?

Production sites के लिए A+। इसके लिए जरूरी है: सिर्फ TLS 1.2+, AEAD ciphers, valid chain, लंबे max-age के साथ HSTS। ऊपर दी गई config A+ देती है।

SSL config कितनी बार review करनी चाहिए?

Yearly, या जब कोई नई vulnerability announce हो। Let’s Encrypt के status page subscribe करें और updated recommendations के लिए Mozilla SSL Configuration Generator follow करें।

क्या कोई tool है जो सही config generate करता है?

हाँ — Mozilla SSL Configuration Generator। अपना server (Nginx, Apache, etc.), अपना server version choose करें, और यह एक recommended config generate करता है। “Modern” profile इस article में दी गई practices से match करता है।

संबंधित लेख

SSL और Certificates 2026-05-08
TLS 1.3 क्या है? सब कुछ जो बदला
TLS 1.3 current encryption standard है — faster handshake, mandatory forward secrecy, कोई old algorithms नहीं। जानें TLS 1.2 से क्या बदला, इसे कैसे enable करें, और क्या आपको enforce करना चाहिए।
SSL और Certificates 2026-05-08
Forward Secrecy (Perfect Forward Secrecy) क्या है?
Forward secrecy का मतलब है कि हर TLS connection एक unique key use करता है। भले ही आपके server की private key compromise हो जाए, past conversations को decrypt नहीं किया जा सकता। जानें यह कैसे काम करता है और इसे enable कैसे ensure करें।
SSL और Certificates 2026-05-08
HSTS: HTTP Strict Transport Security explained
HSTS browser को हमेशा HTTPS use करने के लिए कहता है। जानें HSTS कैसे configure करें, कौन सा max-age use करें, preload कब add करें, और गलत करने के risks।
डिप्लॉयमेंट 2026-05-08
Nginx पर SSL Certificate कैसे Install करें
Nginx पर SSL certificate install करने की step-by-step guide। File upload, full server block config, TLS best practices, HTTP/2, HSTS, redirect setup, testing, और 6 common errors का troubleshooting included है।
अपने browser में मुफ़्त SSL certificate पाएँ
कोई installation नहीं, कोई account नहीं। आपकी private key कभी आपका device नहीं छोड़ती।
अपना certificate पाएँ