SSL/TLS Sertifikati — Kompletni vodic

Sve sto treba da znate o HTTPS enkripciji, tipovima sertifikata i pravilnoj konfiguraciji

95%
HTTPS saobracaja u Chrome-u
82%
Sajtova koristi HTTPS
300M+
Let's Encrypt sertifikata

1. Sta je SSL/TLS i kako radi

SSL (Secure Sockets Layer) i njegov naslednik TLS (Transport Layer Security) su kriptografski protokoli koji obezbjedjuju sigurnu komunikaciju preko interneta. Kada posetite sajt koji pocinje sa https://, vas browser i server koriste TLS da enkriptuju sve podatke koji se razmenjuju.

TLS obezbjedjuje tri kljucne stvari:

  • Enkripcija — Podaci se sifruju tako da trece strane ne mogu da ih procitaju tokom prenosa. Koriste se simetricni algoritmi poput AES-256-GCM.
  • Autentifikacija — Sertifikat dokazuje da komunicirate sa pravim serverom, a ne sa napadacem (man-in-the-middle zastita).
  • Integritet — MAC (Message Authentication Code) garantuje da podaci nisu izmenjeni tokom prenosa.

Referenca: RFC 8446 — The Transport Layer Security (TLS) Protocol Version 1.3

2. TLS Handshake — korak po korak

Pre nego sto se podaci enkriptuju, browser i server moraju da se "dogovore" kroz proces poznat kao TLS handshake. U TLS 1.3, ovaj proces je optimizovan na samo 1 round-trip (1-RTT), dok je TLS 1.2 zahtevao 2 round-trip-a.

TLS 1.3 Handshake (1-RTT)

  1. ClientHello — Browser salje listu podrzanih cipher suite-ova, kljuc za razmenu (Key Share), i podrzane verzije TLS-a.
  2. ServerHello — Server bira cipher suite, salje svoj Key Share, sertifikat, i Finished poruku — sve u jednom odgovoru.
  3. Klijent verifikuje — Browser proverava sertifikat, generise sesijski kljuc i salje Finished poruku.
  4. Enkriptovana komunikacija — Svi dalji podaci se sifruju pomocu dogovorenog sesijskog kljuca (AES-256-GCM ili ChaCha20-Poly1305).
TLS 1.3 poboljsanja: Uklonjena podrska za zastarele algoritme (RSA key exchange, CBC mode, RC4, SHA-1, MD5, DES, 3DES). Dodat 0-RTT resumption za ponovne konekcije.

TLS 1.2 vs TLS 1.3 — Poredjenje

KarakteristikaTLS 1.2TLS 1.3
Handshake round-trips2-RTT1-RTT (0-RTT za resumpciju)
Cipher suites37+5 (samo bezbedni)
Forward SecrecyOpcionoObavezno
RSA key exchangeDaUklonjen
RFCRFC 5246 (2008)RFC 8446 (2018)

3. Istorija: od SSL 1.0 do TLS 1.3

Protokol je prosao kroz znacajnu evoluciju od nastanka u Netscape-u do modernog TLS 1.3:

VerzijaGodinaStatusNapomena
SSL 1.01994Nikada objavljenImao ozbiljne bezbednosne propuste
SSL 2.01995Deprecated 2011 (RFC 6176)Podlozan DROWN napadu
SSL 3.01996Deprecated 2015 (RFC 7568)Podlozan POODLE napadu (CVE-2014-3566)
TLS 1.01999Deprecated 2020 (RFC 8996)Podlozan BEAST napadu
TLS 1.12006Deprecated 2020 (RFC 8996)Nema podrsku za AEAD cipher-e
TLS 1.22008AktivanNajsire koriscen, RFC 5246
TLS 1.32018Aktivan (preporucen)Brzi, bezbedniji, RFC 8446
Vazno: Od marta 2020, svi moderni browseri (Chrome 84+, Firefox 78+, Safari 14+, Edge 84+) su uklonili podrsku za TLS 1.0 i TLS 1.1. Ako vas server koristi ove verzije, korisnici ce videti gresku.

4. Zasto je HTTPS obavezan

HTTPS vise nije opcija — to je standard za svaki sajt, bez obzira da li je blog, web prodavnica ili korporativni portal.

Google rangiranje (SEO)

Google je 2014. godine objavio da je HTTPS signal za rangiranje. Od 2018. godine, Chrome oznacava sve HTTP sajtove kao "Not Secure". Prema Google Transparency Report-u, 95% ucitanih stranica u Chrome-u koristi HTTPS (podaci iz 2024).

Upozorenja u browser-u

Moderni browseri aktivno upozoravaju korisnike kada pristupaju HTTP sajtovima:

  • Chrome — Prikazuje "Not Secure" pored URL-a, a za forme sa lozinkama prikazuje upozorenje preko celog ekrana.
  • Firefox — Prikazuje precrtani katanac i upozorenje za login forme.
  • Safari — Prikazuje "Not Secure" tekst u address bar-u.

GDPR i pravna obaveza

Clan 32 GDPR-a zahteva "odgovarajuce tehnicke mere" za zastitu licnih podataka. Enkripcija u tranzitu (HTTPS) se eksplicitno pominje kao primer. Sajtovi bez HTTPS-a koji obradjuju licne podatke rizikuju kazne do 20 miliona EUR ili 4% globalnog prihoda.

HTTP/2 i performanse

HTTP/2 protokol, koji donosi znacajne performanse (multipleksiranje, kompresija headera, server push), u praksi zahteva HTTPS — nijedan browser ne podrzava HTTP/2 preko obicnog HTTP-a.

5. Tipovi sertifikata: DV, OV, EV

SSL/TLS sertifikati se dele u tri kategorije prema nivou validacije:

TipValidacijaVreme izdavanjaCenaPrimena
DV (Domain Validation)Vlasnistvo nad domenomMinutiBesplatno — $50/godBlogovi, mali sajtovi
OV (Organization Validation)Vlasnistvo + identitet organizacije1-3 dana$50 — $200/godPoslovni sajtovi
EV (Extended Validation)Detaljni pravna provera1-2 nedelje$150 — $500+/godBanke, e-commerce

DV sertifikati

Najjednostavniji tip — CA (Certificate Authority) samo proverava da kontrolisete domen. Provera se vrsi putem DNS TXT zapisa, HTTP fajla ili email-a. Let's Encrypt izdaje iskljucivo DV sertifikate.

OV sertifikati

Pored domenskog vlasnistva, CA proverava i identitet organizacije (ime, adresa, registracija). Ovo zahteva dostavljanje pravne dokumentacije. Korisnici mogu videti informacije o organizaciji klikom na katanac u browser-u.

EV sertifikati

Najstroza validacija — CA proverava pravni status, fizicku adresu i operativni status organizacije. Ranije su browseri prikazivali zelenu traku sa imenom firme, ali Chrome (od verzije 77, sep 2019) i Firefox (od verzije 70) su uklonili tu vizuelnu razliku.

Wildcard sertifikati: Pokrivaju jedan domen i sve poddomene (*.primer.com). Dostupni su za DV i OV tipove. Let's Encrypt podrzava wildcard sertifikate od marta 2018 (verzija ACMEv2).

6. Let's Encrypt: kako dobiti besplatan sertifikat

Let's Encrypt je besplatna, automatizovana i otvorena Certificate Authority koju pokece Internet Security Research Group (ISRG). Lansirana u aprilu 2016, do danas je izdala preko 300 miliona aktivnih sertifikata pokrivajuci vise od 360 miliona domena.

Korak 1: Instalirajte Certbot

# Ubuntu/Debian
sudo apt update
sudo apt install certbot python3-certbot-nginx

# CentOS/RHEL
sudo dnf install certbot python3-certbot-nginx

Korak 2: Dobijte sertifikat

# Za Nginx
sudo certbot --nginx -d vasadomena.com -d www.vasadomena.com

# Za Apache
sudo certbot --apache -d vasadomena.com -d www.vasadomena.com

# Samo sertifikat (bez automatske konfiguracije)
sudo certbot certonly --standalone -d vasadomena.com

Korak 3: Automatsko obnavljanje

Let's Encrypt sertifikati vaze 90 dana. Certbot automatski postavlja cron job za obnavljanje:

# Testirajte automatsko obnavljanje
sudo certbot renew --dry-run

# Cron job (automatski dodat)
0 0,12 * * * root certbot renew --quiet
Alternativni ACME klijenti: Pored Certbot-a, mozete koristiti acme.sh, Caddy (ugradjeni ACME), Traefik, ili win-acme za Windows servere.

7. Ceste greske i kako ih resiti

Mixed Content

Nastaje kada HTTPS stranica ucitava resurse (slike, skripte, stilove) preko HTTP-a. Browser blokira "active mixed content" (skripte, iframe-ove) i prikazuje upozorenje za "passive mixed content" (slike).

<!-- LOSE: mixed content -->
<img src="http://primer.com/slika.jpg">
<script src="http://primer.com/skripta.js"></script>

<!-- DOBRO: koristite HTTPS ili relativne URL-ove -->
<img src="https://primer.com/slika.jpg">
<script src="//primer.com/skripta.js"></script>

Istekao sertifikat (ERR_CERT_DATE_INVALID)

Sertifikati imaju rok trajanja. Kada isteknu, browser prikazuje full-screen upozorenje. Resenje: automatizujte obnavljanje sa Certbot-om ili koristite monitoring servise (UptimeRobot, SSL Labs) koji upozoravaju pre isteka.

Self-signed sertifikat (ERR_CERT_AUTHORITY_INVALID)

Self-signed sertifikati nisu potpisani od strane pouzdane CA. Browser im ne veruje i prikazuje upozorenje. Koristite ih samo za development okruzenje, nikada za produkciju.

Nepodudaranje imena (ERR_CERT_COMMON_NAME_INVALID)

Nastaje kada se domen u URL-u ne poklapa sa domenom u sertifikatu. Na primer, sertifikat za www.primer.com nece raditi za primer.com bez SAN (Subject Alternative Name) polja.

Nepotpun lanac sertifikata

Server mora slati i intermediate sertifikate, ne samo leaf sertifikat. Koristite SSL Labs Server Test da proverite lanac.

8. HSTS header i preload lista

HTTP Strict Transport Security (HSTS) je mehanizam koji nareduje browser-u da uvek koristi HTTPS za dati domen. Definisan je u RFC 6797.

Kako HSTS radi

Server salje Strict-Transport-Security header sa HTTPS odgovorom. Browser belezi ovo i za buduce zahteve automatski konvertuje HTTP u HTTPS, bez ikakve redirekcije.

# Preporucena konfiguracija
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  • max-age=63072000 — HSTS vazi 2 godine (u sekundama)
  • includeSubDomains — Primenjuje se i na sve poddomene
  • preload — Dozvoljavate ukljucivanje na HSTS preload listu

HSTS Preload lista

HSTS preload lista je ugradjena u Chrome, Firefox, Safari, Edge i druge browsere. Sajtovi na listi su HTTPS-only od prvog pristupa, bez mogucnosti da korisnik obide zastitu. Prijavite se na hstspreload.org.

Paznja: Dodavanje na preload listu je trajno. Uklanjanje moze trajati mesecima. Budite sigurni da je HTTPS ispravno konfigurisan za sve poddomene pre prijavljivanja.

9. Konfiguracija: Nginx i Apache

Nginx — preporucena SSL konfiguracija

server {
    listen 443 ssl http2;
    server_name vasadomena.com www.vasadomena.com;

    ssl_certificate /etc/letsencrypt/live/vasadomena.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/vasadomena.com/privkey.pem;

    # TLS verzije — samo 1.2 i 1.3
    ssl_protocols TLSv1.2 TLSv1.3;

    # Cipher suite-ovi (Mozilla Intermediate)
    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;

    # HSTS
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;

    # OCSP Stapling
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /etc/letsencrypt/live/vasadomena.com/chain.pem;
    resolver 1.1.1.1 8.8.8.8 valid=300s;

    # DH parametri
    ssl_dhparam /etc/nginx/dhparam.pem;

    # Session cache
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 1d;
    ssl_session_tickets off;
}

# HTTP to HTTPS redirect
server {
    listen 80;
    server_name vasadomena.com www.vasadomena.com;
    return 301 https://$server_name$request_uri;
}

Apache — preporucena SSL konfiguracija

<VirtualHost *:443>
    ServerName vasadomena.com
    ServerAlias www.vasadomena.com

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/vasadomena.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/vasadomena.com/privkey.pem

    # TLS verzije
    SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1

    # Cipher suite-ovi (Mozilla Intermediate)
    SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
    SSLHonorCipherOrder off

    # HSTS
    Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"

    # OCSP Stapling
    SSLUseStapling on
    SSLStaplingCache shmcb:/var/run/ocsp(128000)
</VirtualHost>

# HTTP to HTTPS redirect
<VirtualHost *:80>
    ServerName vasadomena.com
    Redirect permanent / https://vasadomena.com/
</VirtualHost>

Referenca: Mozilla SSL Configuration Generator — generise optimalnu konfiguraciju za vas server.

10. Reference i resursi

Skenirajte vas sajt besplatno

SSL/TLS Certificates — Complete Guide

Everything you need to know about HTTPS encryption, certificate types, and proper configuration

95%
HTTPS traffic in Chrome
82%
Websites using HTTPS
300M+
Let's Encrypt certificates

1. What is SSL/TLS and how it works

SSL (Secure Sockets Layer) and its successor TLS (Transport Layer Security) are cryptographic protocols that ensure secure communication over the internet. When you visit a site starting with https://, your browser and the server use TLS to encrypt all exchanged data.

TLS provides three key guarantees:

  • Encryption — Data is encrypted so third parties cannot read it during transit. Symmetric algorithms like AES-256-GCM are used.
  • Authentication — The certificate proves you are communicating with the real server, not an attacker (man-in-the-middle protection).
  • Integrity — MAC (Message Authentication Code) guarantees that data has not been altered during transit.

Reference: RFC 8446 — The Transport Layer Security (TLS) Protocol Version 1.3

2. TLS Handshake — step by step

Before data is encrypted, the browser and server must "negotiate" through a process known as the TLS handshake. In TLS 1.3, this process is optimized to just 1 round-trip (1-RTT), while TLS 1.2 required 2 round-trips.

TLS 1.3 Handshake (1-RTT)

  1. ClientHello — The browser sends a list of supported cipher suites, key share, and supported TLS versions.
  2. ServerHello — The server selects a cipher suite, sends its Key Share, certificate, and Finished message — all in one response.
  3. Client verifies — The browser verifies the certificate, generates a session key, and sends a Finished message.
  4. Encrypted communication — All further data is encrypted using the agreed session key (AES-256-GCM or ChaCha20-Poly1305).
TLS 1.3 improvements: Removed support for deprecated algorithms (RSA key exchange, CBC mode, RC4, SHA-1, MD5, DES, 3DES). Added 0-RTT resumption for reconnections.

TLS 1.2 vs TLS 1.3 — Comparison

FeatureTLS 1.2TLS 1.3
Handshake round-trips2-RTT1-RTT (0-RTT for resumption)
Cipher suites37+5 (only secure ones)
Forward SecrecyOptionalMandatory
RSA key exchangeYesRemoved
RFCRFC 5246 (2008)RFC 8446 (2018)

3. History: from SSL 1.0 to TLS 1.3

The protocol has gone through significant evolution from its origins at Netscape to modern TLS 1.3:

VersionYearStatusNote
SSL 1.01994Never releasedHad serious security flaws
SSL 2.01995Deprecated 2011 (RFC 6176)Vulnerable to DROWN attack
SSL 3.01996Deprecated 2015 (RFC 7568)Vulnerable to POODLE (CVE-2014-3566)
TLS 1.01999Deprecated 2020 (RFC 8996)Vulnerable to BEAST attack
TLS 1.12006Deprecated 2020 (RFC 8996)No AEAD cipher support
TLS 1.22008ActiveMost widely used, RFC 5246
TLS 1.32018Active (recommended)Faster, more secure, RFC 8446
Important: Since March 2020, all modern browsers (Chrome 84+, Firefox 78+, Safari 14+, Edge 84+) have dropped support for TLS 1.0 and TLS 1.1. If your server uses these versions, users will see an error.

4. Why HTTPS is mandatory

HTTPS is no longer optional — it is the standard for every website, whether it is a blog, web store, or corporate portal.

Google ranking (SEO)

Google announced in 2014 that HTTPS is a ranking signal. Since 2018, Chrome marks all HTTP sites as "Not Secure". According to Google Transparency Report, 95% of pages loaded in Chrome use HTTPS (2024 data).

Browser warnings

Modern browsers actively warn users when accessing HTTP sites:

  • Chrome — Displays "Not Secure" next to the URL, and for forms with passwords shows a full-screen warning.
  • Firefox — Displays a crossed-out padlock and warning for login forms.
  • Safari — Displays "Not Secure" text in the address bar.

GDPR and legal obligation

Article 32 of GDPR requires "appropriate technical measures" to protect personal data. Encryption in transit (HTTPS) is explicitly mentioned as an example. Sites without HTTPS that process personal data risk fines up to 20 million EUR or 4% of global revenue.

HTTP/2 and performance

HTTP/2, which brings significant performance improvements (multiplexing, header compression, server push), in practice requires HTTPS — no browser supports HTTP/2 over plain HTTP.

5. Certificate types: DV, OV, EV

SSL/TLS certificates are divided into three categories based on the level of validation:

TypeValidationIssuance timeCostUse case
DV (Domain Validation)Domain ownershipMinutesFree — $50/yrBlogs, small sites
OV (Organization Validation)Ownership + organization identity1-3 days$50 — $200/yrBusiness sites
EV (Extended Validation)Detailed legal verification1-2 weeks$150 — $500+/yrBanks, e-commerce

DV certificates

The simplest type — the CA only verifies you control the domain. Verification is done via DNS TXT record, HTTP file, or email. Let's Encrypt issues exclusively DV certificates.

OV certificates

In addition to domain ownership, the CA also verifies the organization's identity (name, address, registration). This requires submitting legal documentation. Users can view organization information by clicking the padlock in the browser.

EV certificates

The strictest validation — the CA verifies the legal status, physical address, and operational status of the organization. Browsers used to display a green bar with the company name, but Chrome (from version 77, Sep 2019) and Firefox (from version 70) removed this visual distinction.

Wildcard certificates: Cover one domain and all subdomains (*.example.com). Available for DV and OV types. Let's Encrypt supports wildcard certificates since March 2018 (ACMEv2).

6. Let's Encrypt: how to get a free certificate

Let's Encrypt is a free, automated, and open Certificate Authority run by the Internet Security Research Group (ISRG). Launched in April 2016, it has issued over 300 million active certificates covering more than 360 million domains.

Step 1: Install Certbot

# Ubuntu/Debian
sudo apt update
sudo apt install certbot python3-certbot-nginx

# CentOS/RHEL
sudo dnf install certbot python3-certbot-nginx

Step 2: Obtain a certificate

# For Nginx
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

# For Apache
sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

# Certificate only (no automatic configuration)
sudo certbot certonly --standalone -d yourdomain.com

Step 3: Automatic renewal

Let's Encrypt certificates are valid for 90 days. Certbot automatically sets up a cron job for renewal:

# Test automatic renewal
sudo certbot renew --dry-run

# Cron job (automatically added)
0 0,12 * * * root certbot renew --quiet
Alternative ACME clients: In addition to Certbot, you can use acme.sh, Caddy (built-in ACME), Traefik, or win-acme for Windows servers.

7. Common mistakes and how to fix them

Mixed Content

Occurs when an HTTPS page loads resources (images, scripts, styles) over HTTP. The browser blocks "active mixed content" (scripts, iframes) and shows a warning for "passive mixed content" (images).

<!-- BAD: mixed content -->
<img src="http://example.com/image.jpg">
<script src="http://example.com/script.js"></script>

<!-- GOOD: use HTTPS or protocol-relative URLs -->
<img src="https://example.com/image.jpg">
<script src="//example.com/script.js"></script>

Expired certificate (ERR_CERT_DATE_INVALID)

Certificates have an expiration date. When they expire, the browser displays a full-screen warning. Solution: automate renewal with Certbot or use monitoring services (UptimeRobot, SSL Labs) that alert before expiration.

Self-signed certificate (ERR_CERT_AUTHORITY_INVALID)

Self-signed certificates are not signed by a trusted CA. Browsers do not trust them and display a warning. Use them only for development environments, never for production.

Name mismatch (ERR_CERT_COMMON_NAME_INVALID)

Occurs when the domain in the URL does not match the domain in the certificate. For example, a certificate for www.example.com will not work for example.com without a SAN (Subject Alternative Name) field.

Incomplete certificate chain

The server must send intermediate certificates, not just the leaf certificate. Use SSL Labs Server Test to verify your chain.

8. HSTS header and preload list

HTTP Strict Transport Security (HSTS) is a mechanism that instructs the browser to always use HTTPS for a given domain. It is defined in RFC 6797.

How HSTS works

The server sends the Strict-Transport-Security header with the HTTPS response. The browser records this and for future requests automatically converts HTTP to HTTPS, without any redirect.

# Recommended configuration
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  • max-age=63072000 — HSTS is valid for 2 years (in seconds)
  • includeSubDomains — Applies to all subdomains as well
  • preload — You allow inclusion in the HSTS preload list

HSTS Preload list

The HSTS preload list is built into Chrome, Firefox, Safari, Edge, and other browsers. Sites on the list are HTTPS-only from the first visit, without the possibility for users to bypass the protection. Apply at hstspreload.org.

Caution: Adding to the preload list is permanent. Removal can take months. Make sure HTTPS is properly configured for all subdomains before applying.

9. Configuration: Nginx and Apache

Nginx — recommended SSL configuration

server {
    listen 443 ssl http2;
    server_name yourdomain.com www.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

    # TLS versions — only 1.2 and 1.3
    ssl_protocols TLSv1.2 TLSv1.3;

    # Cipher suites (Mozilla Intermediate)
    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;

    # HSTS
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;

    # OCSP Stapling
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /etc/letsencrypt/live/yourdomain.com/chain.pem;
    resolver 1.1.1.1 8.8.8.8 valid=300s;

    # DH parameters
    ssl_dhparam /etc/nginx/dhparam.pem;

    # Session cache
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 1d;
    ssl_session_tickets off;
}

# HTTP to HTTPS redirect
server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;
    return 301 https://$server_name$request_uri;
}

Apache — recommended SSL configuration

<VirtualHost *:443>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem

    # TLS versions
    SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1

    # Cipher suites (Mozilla Intermediate)
    SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
    SSLHonorCipherOrder off

    # HSTS
    Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"

    # OCSP Stapling
    SSLUseStapling on
    SSLStaplingCache shmcb:/var/run/ocsp(128000)
</VirtualHost>

# HTTP to HTTPS redirect
<VirtualHost *:80>
    ServerName yourdomain.com
    Redirect permanent / https://yourdomain.com/
</VirtualHost>

Reference: Mozilla SSL Configuration Generator — generates optimal configuration for your server.

10. References and resources

Scan your site for free