Skip to main content

What is HTTPS?

HTTPS (HyperText Transfer Protocol Secure) is a secure version of HTTP that uses encryption for the safe exchange of data between a client and a server.

In simple terms: HTTPS is HTTP with data protection added.


Why HTTPS is needed

HTTPS is needed to:

  • protect data from interception
  • hide logins, passwords, tokens
  • guarantee that the client is talking to the intended server
  • protect data from tampering

Without HTTPS, anyone on the network could:

  • read the data being transferred
  • change it "along the way"

The difference between HTTP and HTTPS

HTTP

  • data is transferred in plain form
  • easy to intercept
  • unsafe for passwords and forms

HTTPS

  • data is encrypted
  • protected from interception and tampering
  • used everywhere there is authorization and personal data

Today, HTTP is considered outdated for websites.


How HTTPS works (simplified)

  1. The client connects to the server over HTTPS
  2. The server sends an SSL/TLS certificate
  3. The client checks the certificate:
  • whether it is valid
  • who it was issued to
  1. An encrypted connection is established
  2. From then on, data is transferred in protected form

What TLS is (very briefly)

TLS (Transport Layer Security) is a protocol that:

  • encrypts data
  • ensures integrity
  • confirms the server's authenticity

HTTPS = HTTP + TLS


HTTPS port

Often asked in an interview:

  • HTTP → port 80
  • HTTPS → port 443

Real-life example

HTTP is like:

  • talking out loud in a crowded place

HTTPS is like:

  • talking on a secure phone line, no one else can hear the conversation

What matters for an interview

  • HTTPS is not a new protocol, it is a layer on top of HTTP
  • the methods, URLs, and response codes stay the same
  • only the security of the transfer differs
  • browsers mark HTTP sites as not secure

Short answer for an interview

Remember this wording:

HTTPS is a secure version of HTTP that uses TLS to encrypt data and ensures the confidentiality, integrity, and authenticity of the connection between a client and a server.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.