Back to Articles
Cloud & Network6 min readHow Internet Requests Actually Work · Part 7 of 8

HTTPS, TLS Handshakes, and HTTP Status Codes Explained

Understand how TLS adds encryption, integrity, and server authentication to HTTP, what browsers verify in a certificate, and what common 2xx, 3xx, 4xx, and 5xx status codes mean.

HTTPSTLSHTTP Status CodesCertificatesWeb Security

HTTPS is HTTP carried through TLS. HTTP still defines methods, paths, headers, bodies, and status codes; TLS protects those bytes while they travel between endpoints.

Diagram 1

How HTTPS and TLS Protect HTTP

TLS authenticates the server, negotiates secure keys, and protects the HTTP data exchanged afterward.

What TLS Adds

Encryption
Observers should not be able to read protected application data as plaintext.
Integrity
Endpoints can detect unauthorized modification of protected traffic.
Authentication
The client validates that the certificate represents the requested hostname.

HTTPS does not prove that a business is honest or an application is vulnerability-free. It establishes a protected connection to the validated hostname. A deceptive site can have a valid certificate for its own domain.

A Simplified TLS Handshake

Client hello -> Server certificate -> Certificate validation -> Key agreement -> Encrypted HTTP

The browser checks whether the certificate chains to a trusted authority, matches the hostname, is within its validity period, and satisfies security policy. The exact TLS 1.3 exchange is more detailed, but the outcome is a secure session with shared traffic keys.

HTTP Status Code Families

1xx
Informational progress or protocol handling.
2xx
The request was successfully handled.
3xx
The client should use another location or cached representation.
4xx
The request cannot be fulfilled as sent or is not permitted.
5xx
The server or gateway failed while handling the request.
Diagram 2

HTTP Responses and Status Codes

Status codes summarize how a server or intermediary handled a request, from success and redirects to client and server errors.
  • 200 OK: success. 201 Created: a new resource was created.
  • 301 or 308: permanent redirect. 302 or 307: temporary redirect.
  • 400 Bad Request: invalid request. 401: authentication missing or invalid.
  • 403 Forbidden: access denied. 404 Not Found: target unavailable.
  • 429 Too Many Requests: a rate or usage limit was exceeded.

The Server and Gateway Errors

500
The application encountered an internal failure.
502
A gateway received an invalid response from its upstream.
503
The service is temporarily unavailable or overloaded.
504
A gateway timed out waiting for its upstream.

A status identifies the HTTP outcome, not always the root cause. A 504 may originate from a slow database behind several services. Logs, traces, and timing at every boundary are still needed.

Two questions

TLS tells you whether a protected connection was established. HTTP status tells you how the request was handled after communication became possible.

Series

How Internet Requests Actually Work

An eight-part beginner series tracing internet communication from an HTTP request through DNS, IP, ports, transport protocols, packets, network devices, server infrastructure, security, and troubleshooting.

Part 7 of 8
About the Author

Nikhlesh Yadav is a Technical Lead and Solution Architect with 12+ years of experience across cloud-native systems, distributed platforms, AI integrations, Web3, and cyber security.

Read full profile