Why Your Website Needs HTTPS: Encryption Basics and the TLS Handshake
Open any bank or e-commerce site and you will see a small padlock in the address bar, with the address starting in https://. What does that padlock mean? HTTP and HTTPS differ by one letter, yet their security levels are worlds apart. This article uses everyday analogies to explain encryption, the TLS handshake, and certificates.
1. HTTP vs HTTPS
HTTP is the protocol browsers and servers use to transfer data, and it is not encrypted: passwords, orders, and ID numbers travel as plaintext on the network, readable by any router in between — like mailing a postcard. The mail carrier can read it, and so can every relay station.
HTTPS = HTTP + TLS (Transport Layer Security). It adds an encryption layer. Comparison:
| Aspect | HTTP | HTTPS |
|---|---|---|
| Transport | Plaintext, readable | Encrypted, unreadable if intercepted |
| Default port | 80 | 443 |
| Identity verification | None | Certificates verify the server |
| Tampering | Easy | Extremely hard |
| Modern browsers | Marked "Not Secure" | Shows a padlock |
In short, HTTPS solves three problems at once: confidentiality (encryption), integrity (anti-tampering), and authentication (anti-impersonation).
2. Symmetric Encryption: One Shared Key
Symmetric encryption is the most intuitive form: the sender and receiver use the same key to encrypt and decrypt, like two people sharing one lock.
Its strength is speed, which makes it ideal for large amounts of data. Its weakness is the "key exchange" problem: if you send the key over the network, the key itself can be stolen, and the encryption becomes meaningless. It is a chicken-and-egg problem.
3. Asymmetric Encryption: The Mailbox
Asymmetric encryption uses a key pair: a public key that can be shared and a private key that must stay secret. Data encrypted with the public key can only be decrypted with the private key.
Think of a mailbox: anyone can drop a letter through the public slot (the public key), but only you can open the box with your key (the private key). Anyone can send in, but only you can read it.
Asymmetric encryption solves the key-exchange problem but is computationally expensive and slow, so it is not suited to large payloads. The real-world solution combines both.
4. The TLS Handshake (Simplified): Four Steps to an Encrypted Conversation
The full handshake is complex, but the core logic fits into four steps:
- Hello: the browser sends a "hello" listing the cipher suites it supports and a random number;
- Show the certificate: the server sends back its digital certificate (containing its public key and identity);
- Verify + exchange keys: the browser verifies the certificate was issued by a trusted CA and matches the domain, then generates a random number (the session key for symmetric encryption) and encrypts it with the server's public key;
- Talk: the server decrypts with its private key, both sides confirm, and all subsequent data is encrypted symmetrically with that session key.
The whole process is invisible to the user and typically completes in around 100 ms. Just remember the takeaway: after the handshake, data is encrypted symmetrically (fast), and the symmetric key itself was safely delivered using asymmetric encryption (solving the key-exchange problem).
5. What Certificates Do: ID Card + Vault
A certificate is the linchpin of HTTPS security. It does two jobs: proving "who I am" (identity) and providing the public key (encryption).
Certificates are issued by Certificate Authorities (CAs), and browsers ship with a list of trusted CAs. When a server presents a certificate, the browser checks whether the issuer is trusted, whether the certificate is expired, and whether the domain matches. Failure on any check triggers a warning. For choosing DV/OV/EV and single/wildcard/multi-domain types, see SSL Certificate Types Guide.
6. How to Put Your Site on HTTPS
For personal sites, the cheapest path is a free Let's Encrypt certificate (valid 90 days) with automatic renewal:
- Install a tool like Certbot on the server;
- Point your domain's DNS at the server;
- Run the command to obtain and deploy the certificate, and redirect port 80 to 443;
- Set up a scheduled task for automatic renewal.
Step-by-step instructions: Let's Encrypt SSL Setup Guide. If your site sits behind a CDN, certificate setup differs slightly — see CDN and HTTPS Configuration Basics. For migrating an entire site from HTTP to HTTPS, see Website HTTPS Migration Guide.
7. FAQ
Q1: Are free certificates reliable? Yes. Let's Encrypt DV certificates have the same security strength as paid DV certificates. The differences are stronger validation options, longer validity, and human support that paid certificates offer.
Q2: Why does my browser still warn on my HTTPS site? Common causes: expired certificate, domain mismatch, incomplete certificate chain, or mixed content (HTTP resources inside an HTTPS page). Check them one by one.
Q3: Does HTTPS slow down my site? Negligibly. The handshake adds only tens of milliseconds, and modern HTTP/2 and HTTP/3 actually make things faster. The benefits far outweigh the cost.
Q4: Can I still run an HTTP-only site? Technically yes, but every major browser marks it "Not Secure", login and payment features are hindered, and SEO suffers. Migrate as soon as possible.
8. Summary
One line: HTTPS uses asymmetric encryption to deliver the key safely, symmetric encryption to move data fast, and certificates to verify identity — together covering the three risks of eavesdropping, tampering, and impersonation. To learn more about security, bookmark the Security & SSL category.