Browser InternalsBasic
What is the difference between HTTP and HTTPS?
Core Difference
HTTP (HyperText Transfer Protocol) transmits data in plain text without encryption. HTTPS (HTTP Secure) adds a TLS/SSL encryption layer on top of HTTP to ensure secure data transmission.
Key Differences
| Feature | HTTP | HTTPS |
|---|---|---|
| Default Port | 80 | 443 |
| Encryption | None | TLS/SSL encrypted |
| Security | Low, vulnerable to eavesdropping and MITM attacks | High, encrypted transmission |
| Certificate | Not required | SSL certificate required |
| SEO | Lower ranking | Preferred by Google |
How HTTPS Works
- Client initiates a connection request
- Server returns an SSL certificate (containing public key)
- Client verifies the certificate's validity
- Both sides exchange a symmetric key via asymmetric encryption
- Subsequent communication is encrypted with the symmetric key
Why Use HTTPS?
- Prevent eavesdropping: Data is encrypted, third parties cannot read the content
- Prevent tampering: Data integrity checks prevent man-in-the-middle modifications
- Authentication: Verifies the server's true identity
- SEO advantage: Search engines rank HTTPS sites higher
✦ AI Mock Interview
Type your answer and get instant AI feedback
Sign in to use AI scoring
