HTTPS is HTTP running over TLS (Transport Layer Security).
TLS is responsible for encrypting the communication.
HTTP still handles things like:
🎯 Methods (
GET, POST)🎯 Headers
🎯 Cookies
🎯 Status codes
Before any HTTP data is exchanged, the browser and server perform a TLS handshake.
During this process they:
- Verify the server's identity using its certificate.
- Agree on an encryption algorithm.
- Generate shared encryption keys.
Only after that does the browser send the first HTTP request.
Without TLS, every request and response could be read or modified while travelling across the network.
👉 HTTPS isn't a different protocol. It's HTTP inside an encrypted tunnel.
