HTTP vs HTTPS

HTTP sends everything as plain text. If you log in to an HTTP site over public Wi-Fi, anyone on the same network can read your username and password with a packet sniffer. HTTPS wraps HTTP inside TLS (Transport Layer Security), so all data is encrypted before it leaves your device.

FeatureHTTPHTTPS
Default port80443
EncryptionNoneTLS (AES-256 typically)
Server authenticationNoneSSL/TLS certificate
Data integrityNo — can be tamperedYes — HMAC verification
SEO rankingPenalisedPreferred by Google
Browser indicator"Not Secure" warningPadlock icon

Symmetric vs Asymmetric Encryption

TLS uses both types of encryption — each for a different purpose:

  • Asymmetric encryption (RSA, ECDSA): Uses a public/private key pair. Anything encrypted with the public key can only be decrypted with the private key. Used during the TLS handshake to securely exchange a session key. Slow — not suitable for bulk data.
  • Symmetric encryption (AES): Both sides use the same key. Fast — used to encrypt all actual HTTP traffic once the session key is agreed upon.

TLS uses asymmetric encryption to securely establish a symmetric session key, then uses that symmetric key for everything after. This gives you both security (asymmetric key exchange) and performance (symmetric bulk encryption).

The TLS Handshake (TLS 1.3)

TLS 1.3 (current standard) completes the handshake in 1 round trip (vs 2 in TLS 1.2):

Client → Server: ClientHello (TLS version, supported cipher suites, key share) Server → Client: ServerHello + Certificate + CertificateVerify + Finished Client → Server: Finished --- Encrypted application data begins ---

In detail:

  1. ClientHello: Browser sends supported TLS version, list of cipher suites, and a key share (Diffie-Hellman public value).
  2. ServerHello: Server picks cipher suite, sends its own key share, and its TLS certificate (signed by a CA).
  3. Certificate verification: Browser checks: Is the certificate signed by a trusted CA? Is the domain name in the certificate? Is it expired? If all pass, the server is authenticated.
  4. Key derivation: Both sides use the exchanged key shares (ECDHE) to independently derive the same session key — without ever transmitting it. This is the magic of Diffie-Hellman.
  5. Finished: Both sides send a "Finished" message encrypted with the derived session key, confirming the handshake is complete. All HTTP traffic is now encrypted with AES.

SSL/TLS Certificates

A certificate binds a domain name to a public key, signed by a trusted Certificate Authority (CA). It contains:

  • Domain name(s) it is valid for (Subject Alternative Names)
  • The server's public key
  • Issuing CA name
  • Validity dates (typically 90 days for Let's Encrypt, 1 year for commercial CAs)
  • Digital signature from the CA

Types of certificates

TypeValidatesUse CaseCost
DV (Domain Validated)Domain ownership onlyBlogs, personal sitesFree (Let's Encrypt)
OV (Organisation Validated)Domain + organisation identityBusiness sites$50–$300/yr
EV (Extended Validation)Strict org verificationBanks, e-commerce$100–$600/yr
WildcardDomain + all subdomains (*.example.com)Sites with many subdomainsVaries

💡 Use Let's Encrypt for Free HTTPS

Let's Encrypt issues free, automated, 90-day DV certificates. Certbot (the recommended client) can auto-renew them. For most developer sites and APIs, a DV certificate is perfectly sufficient — it provides the same level of encryption as an EV certificate.

TLS 1.2 vs TLS 1.3

FeatureTLS 1.2TLS 1.3
Handshake round trips2 RTT1 RTT
0-RTT resumptionNoYes (with caveats)
Weak cipher suitesAllowed (RC4, 3DES)Removed — all weak ciphers gone
Forward secrecyOptionalMandatory (ECDHE only)
Adoption~40% of traffic~60% and growing

Common HTTPS Issues

  • Mixed content: Page served over HTTPS but loads an image or script over HTTP — browser blocks or warns. Fix: ensure all resources use HTTPS URLs.
  • Certificate expired: Certificates have expiry dates. Let's Encrypt certs expire every 90 days — automate renewal with Certbot.
  • Certificate name mismatch: Certificate issued for www.example.com but visiting example.com — get a certificate that covers both (or use wildcard).
  • Self-signed certificate: Fine for local development, but browsers will show a security warning. Never use in production.

⚠️ HTTPS ≠ Safe Site

The padlock means the connection is encrypted — not that the site is trustworthy. Phishing sites routinely use HTTPS. Always check the domain name, not just the padlock.

Measure Your HTTPS Performance

Check TLS handshake time, TTFB, and full HTTP timing breakdown for any URL.

Use HTTP Ping Test →

How We Research and Update This Guide

We test the underlying formula or workflow, compare outputs with reliable references, and revise examples whenever the page content changes.

  • The workflow or formula is tested directly in the tool and compared against independent reference examples.
  • Examples are kept practical so readers can verify the result without hidden assumptions.
  • Pages are revised whenever the interface, calculation flow, or surrounding guidance materially changes.

Frequently Asked Questions — HTTPS & TLS