Every time you open a website, send an email, or upload a file, an invisible set of rules springs into action behind the scenes. These rules are called protocols, and they are the reason your browser in one corner of the world can talk to a server thousands of kilometres away. Without them, the web would simply be a tangle of disconnected machines speaking different languages. This post breaks down HTTP, the protocol that powers nearly every page you visit, along with the addressing systems and other protocols that keep the wider internet running smoothly.
Table of Contents
- Why web protocols matter
- Introduction to HTTP
- How Tim Berners-Lee created HTTP
- The role of URLs and URIs
- Understanding URIs, URLs, and URNs
- The structure of a URL
- How HTTP works
- The request-response cycle
- Why HTTP is stateless
- Other web protocols
- SMTP for email
- FTP for file transfer
- NNTP for newsgroups
- Bringing it together
Why web protocols matter
A protocol is a shared set of rules that two computers agree to follow when they exchange data. Think of it as a common grammar. The client (usually your browser) and the server must structure their messages in exactly the same way, or neither side will understand the other. This agreement is what makes communication between applications on different systems possible at all.
Protocols sit at what networking engineers call the application layer, the topmost layer that interacts directly with users. Below it, other protocols like TCP and IP handle the heavy lifting of breaking data into packets, routing them across networks, and reassembling them in the correct order. The web protocols we use every day are built on top of this reliable foundation, so they can focus on the actual task such as fetching a page or delivering a message.
The real value of standardised protocols is interoperability. A website hosted on a Linux server in Bengaluru can be opened on a Windows laptop, an Android phone, or a Mac, all because every device follows the same published rules. This is why a small set of well-defined protocols can support billions of daily interactions without chaos.
Introduction to HTTP
HTTP stands for HyperText Transfer Protocol, and it is the foundation of the World Wide Web. It defines how web browsers and web servers request and share resources such as HTML pages, images, text, and videos. When you type an address into your browser, HTTP is the protocol that carries your request to the server and brings the response back.
How Tim Berners-Lee created HTTP
The story begins at CERN, the particle physics laboratory near Geneva, where the British scientist Tim Berners-Lee invented the World Wide Web in 1989. He was trying to solve a practical problem: scientists from many countries were struggling to share information stored on different computers. His proposal combined existing internet technology with a new idea called hypertext.
Between 1989 and 1991, Berners-Lee and his team built the web on top of the existing TCP and IP protocols, using four building blocks: a markup language (HTML) to format documents, a way to address resources (URLs), a piece of software to view them (the browser), and a protocol to move them around (HTTP). By early 1991, the first servers were running outside CERN, and on 6 August 1991 Berners-Lee publicly announced the project, a date now treated as the official start of the public web.
The earliest version was extremely basic. Later named HTTP/0.9, it was a one-line protocol where a request was a single line beginning with the only available method, GET, followed by the path to the document. The server simply returned an HTML file and closed the connection. From this modest start, HTTP grew into the sophisticated protocol that today carries everything from simple text to high-resolution video.
The role of URLs and URIs
Before HTTP can fetch anything, it needs to know where to look. This is where web addressing comes in. The two terms students often confuse are URI and URL, so it helps to understand how they relate.
Understanding URIs, URLs, and URNs
A URI (Uniform Resource Identifier) is the broad umbrella term. It is any string of characters that identifies a resource on the web, whether by name, by location, or both. A URI identifies a logical or physical resource, and it has two main subtypes.
A URL (Uniform Resource Locator) is the subtype you use every day. It tells the browser not just what a resource is, but exactly how to reach it, including the protocol and the network location. A URN (Uniform Resource Name) is the other subtype. It names a resource permanently without saying where to find it. A good example is an ISBN that identifies a specific book, written as urn:isbn followed by the number. The simple rule to remember is that all URLs and URNs are URIs, but not every URI is a URL.
The structure of a URL
A URL is made of several parts that work together to pinpoint a resource. Consider the address https://www.example.com:443/articles/web.html. The pieces break down as follows:
- Scheme: The protocol the browser must use, such as HTTP or HTTPS at the start of the URL. It can also be FTP or mailto for other resource types.
- Authority: The domain name (or IP address) that identifies the server, sometimes followed by a port number separated by a colon.
- Path: The location of the specific file or directory on the server, like /articles/web.html.
- Query: An optional set of key-value pairs after a question mark, used to pass extra information to the server.
Understanding this structure is genuinely useful. It explains why a typo in the domain leads nowhere, why the scheme determines whether your connection is encrypted, and how the path maps to actual files organised on a server.
How HTTP works
HTTP operates on a client-server model using a simple request-response cycle. Your browser is the client, and the website’s machine is the server. The client always starts the conversation by sending a request, and the server replies with a response. This makes HTTP a pull protocol, since the client pulls information from the server rather than the server pushing it out.
The request-response cycle
An HTTP request contains a few key elements: a method that states the intended action, the URL of the target resource, headers carrying extra details, and sometimes a body with data. The most common methods are GET, which retrieves a resource, and POST, which sends data to the server to create or change something. Other methods include HEAD, which requests only the headers, and DELETE, which removes a resource.
The server processes the request and sends back a response containing a status code, headers, and usually a body with the requested content. You have almost certainly seen these status codes in action. A code of 200 means OK while 404 means the page was not found. The whole exchange travels over a reliable TCP/IP connection, and it can run over plain HTTP or the encrypted HTTPS.
Why HTTP is stateless
One of the most important features of HTTP is that it is stateless. This means the server treats each request as completely independent and forgets the interaction once it sends a response. Nothing from one request is required for the next one to succeed. If you refresh a page or open a new tab, the server does not consult any conversation history.
Statelessness has clear benefits. It makes servers simpler to build and more scalable, because they do not have to store details about every visitor between requests. It also improves reliability, since each request stands fully on its own. The trade-off is a lack of memory at the protocol level, which raises an obvious question: how does a shopping site remember what is in your cart, or keep you logged in?
The answer is that web applications add state on top of the stateless protocol using cookies and sessions. The server stores session data and sends the client a small identifier, often as a cookie. The browser then includes that session id with each new request as a key to the stored data. In this way developers create the feeling of continuity even though HTTP itself remembers nothing.
Other web protocols
HTTP gets most of the attention, but it shares the application layer with several other protocols, each built for a specific job. Knowing them helps you see HTTP as one member of a larger family rather than the whole story.
SMTP for email
SMTP (Simple Mail Transfer Protocol) is the standard for sending email across the internet. Introduced in 1981, it is used by mail servers to send and receive messages. Your email client uses SMTP mainly to push outgoing mail to a server, traditionally over port 25, with ports 587 and 465 used for secure submission. Notably, SMTP only handles sending. To actually fetch messages into your inbox, clients rely on other protocols such as POP3 or IMAP.
FTP for file transfer
FTP (File Transfer Protocol) is the standard method for moving files between a client and a server over a network. It commonly uses port 21, and access can be secured with a username and password. Depending on the permissions granted, a user can download, upload, modify, or delete files on the server. Unlike stateless HTTP, FTP is a stateful protocol, meaning the two sides keep track of information such as login credentials and the current working directory during a session.
NNTP for newsgroups
NNTP (Network News Transfer Protocol) was designed for reading and posting articles to Usenet newsgroups, an early form of distributed online discussion that predates modern web forums and social media. Users would connect to a news server to read messages organised by topic and contribute their own posts. While NNTP is far less common today, it remains a good example of how the early internet developed dedicated protocols for distinct kinds of communication long before everything migrated to the web.
Bringing it together
Protocols are the quiet agreements that make the internet usable. HTTP defines how pages are requested and delivered, URLs and URIs give every resource a precise address, and the request-response cycle combined with statelessness keeps the system fast and scalable. Around HTTP sit specialised protocols like SMTP, FTP, and NNTP, each solving a particular communication problem. Together they form a layered, cooperative system that turns billions of separate machines into a single connected web.
What do you think? Now that you know HTTP is stateless, how do you think the websites you use most often manage to remember your preferences and keep you logged in across visits? And as the web shifts almost entirely to encrypted HTTPS, what does that change for everyday users like you?
References
- https://fiveable.me/computer-networks-a-systems-approach/unit-7
- https://home.cern/science/computing/birth-web/short-history-web
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Evolution_of_HTTP
- https://hpbn.co/brief-history-of-http/
- https://bytebytego.com/guides/url-uri-urn-do-you-know-the-differences/
- https://www.godaddy.com/resources/skills/uri-vs-url-vs-urn
- https://www.geeksforgeeks.org/computer-networks/difference-between-url-and-uri/
- https://academy.nordicsemi.com/courses/wi-fi-fundamentals/lessons/lesson-5-wifi-fundamentals/topic/http-protocol/
- https://www.algolesson.com/2024/02/basics-of-http-request-response-cycle.html
- https://www.ituonline.com/tech-definitions/what-is-a-stateless-protocol/
- https://launchschool.com/books/http/read/statefulness
- https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
- https://www.softwaretestinghelp.com/dns-ftp-smtp-mime-protocols/

Leave a Reply