FE Interview Hub
Browser InternalsBasic

What is the difference between HTTP and HTTPS?

AI Practice

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

  1. Client initiates a connection request
  2. Server returns an SSL certificate (containing public key)
  3. Client verifies the certificate's validity
  4. Both sides exchange a symmetric key via asymmetric encryption
  5. 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