Sitemap

HTTP vs HTTPS

5 min readSep 6, 2026

--

In this page we will understand the difference between HTTP and HTTPS , the protocols which enable communication and secure communication over the internet behind that the actual fact we will try to know. so let’s quickly see the http first.

Press enter or click to view image in full size

First understand HTTP ( HyperText Transfer Protocol)

Imagine you are sending a letter through a transparent envelope

  • HTTP is a protocol used for communication between a client and a web server.
  • It defines how the client sends a request and how the server sends a response.
  • Example: Browser sends GET /users → server returns user data.
  • HTTP sends data in plain text.
  • Anyone who can intercept the communication may be able to read or modify the data.
  • HTTP normally uses port 80.
  • It does not provide encryption by itself.
  • It is therefore not suitable for sensitive information such as passwords, payment details, tokens, etc
Press enter or click to view image in full size

when user type and hit the request to access something using client it can by web browser , mobile application behind the scene what actually happened , user don’t know. here HTTP comes in middle while take and make connection to transfer data. how it ivolved by the time we know in the previous page if didn’t checked out please look at those .

basically it make channel by establishing connect over the internet so that client or browser can send request to server and get some response back by the server. that basically i am trying to let you know.

it provide the way to interact with server we will get in the next page in future but before that it’s very important to understand the thing.

suppose you are trying to get login your instagram profile using web browser. what you basically do here simple open the login page and you will fill the credentials username and password. without worrying anymore.

at this point you being an user don’t no there is chance to get you username and password hacked because of HTTP don’t provide security while transferring data from client to server and back. because of being not secure HTTP the attacker can trace you data and licked. here the actual problem with this but http provide only communication not security. now comes the https into the picture to transfer data safely and securely over the internet.

Press enter or click to view image in full size

Now HTTPS

  • HTTPS is essentially HTTP running over a secure TLS connection.
  • It provides encryption between the client and server.
  • Data is encrypted before being transmitted over the network.
  • If someone intercepts the communication, they should not be able to understand the encrypted data.
  • HTTPS normally uses port 443.
  • HTTPS uses TLS certificates to help establish a secure connection and verify the server’s identity.
  • It protects against important attacks such as eavesdropping and data tampering.
Press enter or click to view image in full size

HTTPS perform action in between after taking data from client and encrypt that using private and public key keep and keep the private key to self and public key send to server along with the encrypted data. so that further server can understand the sent data by decrypt to read and process. at the time of sending response back server encrypt again response and send to the client. thus the secure communication has been done using HTTPs protocol .

Get Ayush Raj’s stories in your inbox

Join Medium for free to get updates from this writer.

This happen in quick and http manage this internally .

Press enter or click to view image in full size

here what i explained above showing in this picture you can see how http internally do TLS. using SSL .

Press enter or click to view image in full size

But HTTPS does more than encryption

There are three important ideas to remember.

                 HTTPS / TLS
│
┌──────────────┼──────────────┐
↓ ↓ ↓
Confidentiality Integrity Authentication
│ │ │
↓ ↓ ↓
Hide data Detect Verify
from others tampering server

--------------------------------------------------------------------
① Confidentiality

Browser ─────🔐─────► Server [ Attacker sees encrypted data ]

--------------------------------------------------------------------
② Integrity

Suppose you send: Transfer ₹100
An attacker should not be able to silently change it to :
Transfer ₹10,000
without the modification being detected.
server will know that's 100 using public key
----------------------------------------------------------------------
③ Authentication

Your browser needs confidence that it is actually communicating with the
intended website.This is where TLS certificates come into the picture.

What is the certificate?

This part often confuses beginners.

Suppose you want to visit: "<https://hdfc.com>"

Your browser needs to establish a secure connection with the server.

The server presents a TLS certificate.

Think of it like an official identity document:

             BANK SERVER
│
│
▼
┌─────────────────┐
│ TLS Certificate │
│ │
│ Identity │
│ Public Key │
│ Validity │
└─────────────────┘
│
▼
Browser

The certificate helps the browser establish that the server is authorized for the domain and provides cryptographic information needed for the secure connection.

7. What happens when you type HTTPS?

Suppose you type: "<https://hdfc.com>"

A simplified picture is:

       BROWSER
│
│ 1. Connect
▼
SERVER
│
│ 2. Certificate
▼
BROWSER
│
│ 3. Establish TLS security
▼
SERVER
│
│ 4. Secure communication
▼
🔐 ENCRYPTED DATA

After the secure connection is established:

Browser
│
│ 🔐 encrypted HTTP request
▼
Internet
│
│ 🔐
▼
Server
│
│ 🔐 encrypted HTTP response
▼
Browser
Press enter or click to view image in full size
Press enter or click to view image in full size

Important Principle

HTTP defines how communication happens.
HTTPS adds security to that communication through TLS.

So HTTPS is not a completely different application protocol. Conceptually:

HTTP + TLS = HTTPS

What HTTPS Provides

HTTPS mainly provides three important security properties:

  1. Confidentiality — others should not be able to read the transmitted data.
  2. Integrity — data should not be modified silently while travelling.
  3. Authentication — the TLS certificate helps the client verify that it is communicating with the intended server.

Easy way to remember:
HTTP = Communication
HTTPS = Communication + Security

--

--

Ayush Raj
Ayush Raj

Written by Ayush Raj

hey , i am ayush raj . A software engineer , exploring and upgrading