What is HTTP?
Also known as: Hypertext Transfer Protocol
HTTP is a text-based request-response protocol that defines how web clients and servers exchange resources, forming the foundation of data communication on the World Wide Web.
HTTP, the Hypertext Transfer Protocol, is an application-layer protocol that enables communication between web clients (such as browsers) and web servers. It operates on a request-response model: the client sends a request message to the server, which replies with a response message containing status information and, typically, a requested resource such as an HTML page, image, or API payload. HTTP is stateless by design, meaning each request-response pair is independent; state management is handled separately via cookies, sessions, or tokens.
The protocol uses a uniform syntax for messages. A request includes a method (GET, POST, PUT, DELETE, etc.), a URI, headers, and optionally a body. The response carries a status code (e.g., 200 OK, 404 Not Found, 500 Internal Server Error), headers, and a body. HTTP originally ran over TCP, typically on port 80 for unencrypted traffic. Modern usage heavily favors HTTPS (HTTP over TLS), which wraps HTTP in an encrypted tunnel on port 443. The protocol has evolved through versions: HTTP/1.1 (RFC 2616, 1999) added persistent connections and chunked transfer; HTTP/2 (RFC 7540, 2015) introduced multiplexing and header compression; HTTP/3 (RFC 9114, 2022) replaced TCP with QUIC over UDP for reduced latency.
HTTP sits at the top of the internet protocol stack, above TCP or UDP (in the case of HTTP/3). It is the primary protocol for the Web, but also underpins RESTful APIs, microservices communication, and content delivery networks. Its extensibility through headers and methods allows it to support caching, authentication, content negotiation, and range requests. Despite its age, HTTP remains the most widely used application-layer protocol on the internet.
Key facts
- HTTP is a stateless, text-based request-response protocol at the application layer.
- Default port is 80 for HTTP; 443 for HTTPS over TLS.
- HTTP/1.1 introduced persistent connections and chunked transfer encoding.
- HTTP/2 added multiplexing, header compression, and server push.
- HTTP/3 runs over QUIC (UDP) instead of TCP for lower latency.
How it works in practice
Related terms
References
More in Web Protocols
CORS
CORS (Cross-Origin Resource Sharing) is a browser security mechanism that lets servers explicitly allow web pages from one origin to request resources from a different origin via HTTP response headers.
GraphQL
GraphQL is a query language and runtime for APIs that lets clients request exactly the data they need in a single round trip, reducing over-fetching and under-fetching.
gRPC
gRPC is a high-performance, open-source remote procedure call framework initially developed by Google. It uses HTTP/2 for transport, Protocol Buffers as its interface definition language and message serialization format, and supports bidirectional streaming.
HTTP Pipelining
HTTP Pipelining is a technique in HTTP/1.1 that sends multiple requests on a single connection without waiting for each response, now largely replaced by HTTP/2 multiplexing.
HTTP Status Code
A three-digit integer in an HTTP response that indicates the result of the server's attempt to process the request, grouped into five classes (1xx through 5xx).
HTTP/1.1
HTTP/1.1 is the persistent-connection version of the Hypertext Transfer Protocol, defined in RFC 2616 and updated by RFCs 7230-7235, enabling multiple requests and responses over a single TCP connection.
HTTP/2
HTTP/2 is a binary, multiplexed version of HTTP that reduces latency through header compression, stream prioritization, and server push, as defined in RFC 7540.
HTTP/3
HTTP/3 is the third major version of the Hypertext Transfer Protocol, which runs over QUIC instead of TCP to reduce latency, eliminate head-of-line blocking, and improve connection setup time.
HTTPS
HTTPS (HTTP Secure) is HTTP traffic encrypted inside a TLS session, protecting data confidentiality, integrity, and server authenticity between a client and a web server.
Keep-Alive
Keep-Alive, also called persistent connection, allows multiple HTTP requests and responses over a single TCP connection, reducing latency and overhead compared to opening a new connection per request.