Back to all posts

System Design Explained to a 5-Year-Old ยท Episode 3

HTTP vs HTTPS Explained: What's the Real Difference?

#System Design#HTTP#HTTPS#TLS#Security#http vs https#http vs https explained#difference between http and https#what is tls#tls certificate explained#how does https work#website encryption explained#ssl vs tls#system design interview#web security basics#port 80 vs port 443
HTTP vs HTTPS Explained: What's the Real Difference?
August 9, 20266 min read

Welcome to a new series: System Design, Explained to a 5-Year-Old. Every episode takes one real system design question and turns it into a story simple enough for a five-year-old to follow, because if you can explain it that simply, you actually understand it.

Alice sends a postcard over HTTP and a locked box over HTTPS, while Eve tries to peek

Keywords

  • HTTP: HyperText Transfer Protocol
  • HTTPS: HyperText Transfer Protocol Secure
  • TLS: Transport Layer Security
  • Client: Usually your browser
  • Server: The computer that provides the website
  • Encryption: Turning readable data into unreadable data
  • Certificate: Helps verify that you're communicating with the real website

Character Mapping

  • Alice: Your Browser / Client
  • Bob's House: Web Server
  • Postcard: HTTP
  • Locked Box: HTTPS
  • ๐Ÿ•ต๏ธ Eve: Someone trying to watch the communication
  • Lock: Encryption
  • ID Card: TLS Certificate
  • Post Office: The Internet

Step 1: Alice Writes a Message (HTTP Request)

Alice wants to send a message to Bob. She writes:

"Bob, please give me the list of products."

That message is an HTTP request. Alice sends it through the post office (the Internet) to Bob's house (the server).

text
Alice ๐Ÿ‘ง
   |
   | "Give me the products"
   โ†“
๐ŸŒ Internet
   |
   โ†“
Bob's Server ๐Ÿ 

HTTP is just the set of rules Alice and Bob use to talk to each other.

Step 2: The Problem With a Postcard (HTTP)

Say Alice writes that message on a postcard instead of sealing it. It passes through a lot of hands on the way to Bob, and anyone along the route (like Eve ๐Ÿ•ต๏ธ) can simply read it.

text
Username: alice
Password: 12345

Not exactly what you want a stranger reading.

HTTP is basically a postcard: it gets the message across, but nothing on it is encrypted.

Step 3: Alice Uses a Locked Box (HTTPS)

So instead, Alice puts the message in a locked box before sending it.

text
Alice ๐Ÿ‘ง
   |
   | ๐Ÿ” Locked message
   โ†“
๐Ÿ•ต๏ธ Eve
   |
   | "I can't read this!"
   โ†“
Bob's Server ๐Ÿ 

That's HTTPS in a nutshell: it uses TLS to protect the communication between browser and server.

text
HTTP
+
TLS
โ†“
HTTPS

Step 4: Bob Shows His ID Card (TLS Certificate)

There's still a problem, though: how does Alice know the person at Bob's house is actually Bob?

Someone could pretend:

"Hi Alice! I'm Bob!"

Alice says:

"Prove it!"

That's where the TLS certificate comes in: think of it as Bob's ID card.

text
Bob ๐Ÿง‘
   โ†“
"Who are you?"
   โ†“
๐Ÿชช TLS Certificate
   โ†“
"I'm the real website!"

It's how the browser confirms it's actually talking to the real website before anything else happens.

Step 5: Alice and Bob Create a Secret Way to Talk

Once the browser trusts the certificate, it and the server agree on a set of keys only the two of them know, like Alice and Bob settling on their own private lock.

text
Alice ๐Ÿ‘ง
   |
   | ๐Ÿ”‘ Let's create a secure connection
   โ†“
Bob ๐Ÿ 
   |
   | ๐Ÿ” Secure connection established
   โ†“
๐Ÿ’ฌ Encrypted communication

From here on, everything they exchange is locked.

Step 6: The Real System Design Flow

Here's how it looks in a real system. Say you're building an online shopping site, and a user opens:

text
https://myshop.com/products

The request travels through the system:

text
๐Ÿ‘ค User
   |
   | HTTPS ๐Ÿ”
   โ†“
๐ŸŒ Load Balancer
   |
   โ†“
๐Ÿ–ฅ๏ธ Application Server
   |
   โ†“
๐Ÿ—„๏ธ Database

The browser sends something like:

text
GET /products

and the application server sends the product data back.

text
Browser
   |
   | GET /products
   โ†“
Server
   |
   | Product data
   โ†“
Browser

HTTPS just wraps that whole round trip in encryption.

HTTP vs HTTPS: Comparison Table

HTTPHTTPS
๐Ÿ“ฎ Postcard๐Ÿ” Locked box
No TLS encryptionUses TLS
Port 80Port 443
No TLS certificateUses TLS certificate
Communication is not protected by TLSCommunication is protected by TLS

The easiest way to remember it:

HTTP = Communication

HTTPS = Secure Communication

Frequently Asked Questions (FAQ)

Is HTTPS just HTTP with SSL?

Basically, yes. HTTPS is HTTP running over TLS (the modern successor to SSL). The rules for requests and responses don't change, everything just travels through an encrypted, locked connection instead of an open postcard.

Do I need HTTPS if my site doesn't collect passwords?

Yes. Browsers flag plain HTTP sites as "Not Secure," it hurts your search ranking, and HTTPS protects everything a visitor sends, not just login forms, including cookies, form data, and even which pages they're browsing.

What port does HTTPS use?

HTTPS uses port 443 by default. HTTP uses port 80.

Is HTTPS slower than HTTP?

There's a tiny bit of extra work upfront to agree on encryption keys (the TLS handshake), but on modern hardware it's milliseconds, not something a visitor notices. Most of the web runs on HTTPS today without any perceptible slowdown.

Can I get an HTTPS certificate for free?

Yes. Services like Let's Encrypt issue free TLS certificates, and most hosting providers (Vercel, Netlify, Cloudflare, etc.) set up HTTPS automatically.

๐Ÿ• Explain It Like You're 5

You're ordering pizza. With HTTP, it's a normal phone call:

text
๐Ÿ“ž
"Hello! I want one pizza."

With HTTPS, it's the same call over a secure line:

text
๐Ÿ”๐Ÿ“ž
"Hello! I want one pizza."

HTTP and HTTPS aren't two different conversations. HTTPS is just HTTP with a lock added to it.

๐ŸŽฏ The One Thing to Remember

text
HTTP
โ†“
Communication
text
HTTPS
โ†“
HTTP + TLS
โ†“
Secure Communication

So whenever you see:

text
๐Ÿ”’ https://

think:

"My browser is talking to this site over a locked connection."

And in a system design interview, the flow to remember is:

text
๐Ÿ‘ค Client
   โ†“
๐Ÿ” HTTPS
   โ†“
๐ŸŒ Load Balancer
   โ†“
๐Ÿ–ฅ๏ธ Application Server
   โ†“
๐Ÿ—„๏ธ Database

That one extra letter in HTTPS is doing a lot of work.

Enjoyed this article? Share it: