Skip to content

How web works ?

Before jumping into building cool stuff on the web, let’s take a moment to set the context on what is internet and World Wide Web (WWW).


The Internet (or internet) is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a network of networks that consists of private, public, academic, business, and government networks of local to global scope, linked by a broad array of electronic, wireless, and optical networking technologies.


The Internet carries a vast range of information resources and services, such as the interlinked hypertext documents and applications of the World Wide Web (WWW), electronic mail, internet telephony, streaming media and file sharing.

You can read more about the internet over here


You can see from the wikipedia definition, World Wide Web (WWW) mentioned as one of the services on the internet, Internet is the broader network infrastructure that supports multiple services (e.g., email, streaming, VoIP). It refers to physical and technical backbone (cables, routers, servers). Internet is also used for non-web services like email(SMTP/POP3 - Protocol), File sharing (FTP - Protocol), etc.


Where as WWW is a service on built on top of the internet, specifically for accessing and sharing hypertext-based content. Think of it as a way to access information over the internet using web browsers and websites. Web is accessed en-mass through web browsers. It can be via mobile or desktop applications just as you are doing now. Access to web and website is not limited to the common applications such as - firefox, chrome, safari, opera, edge,Internet Explorer (shout out to the time travelers), or if you are one of the cool kids in the block (vivaldi, zen, or arc).

Tim Berners-Lee, a British scientist, invented the World Wide Web (WWW) in 1989, while working at CERN. The web was originally conceived and developed to meet the demand for automated information-sharing between scientists in universities and institutes around the world. You can read more about the history at CERN website or take a look at recreation of worlds first website.

You can read more about the WWW over here.

One can access web through command line using lynx, a text-only web browser for terminal-based environments, or use curl—a command-line tool to fetch web content by sending HTTP requests and retrieving data (e.g., HTML, JSON). Or use a screen reader if you are a visually impaired user. Then there are voice assistants and AI-driven tools in the market that help you browse the web.


Enough of theory, whats is this all for ? It boils down to one question


What happens when you type a website name on search bar and hit enter ?


The short answer is, the server that hosts site returns the website content to your device, and it gets rendered your screen.

If we are peel out some layers, your browser initially connects to something called Domain Name Service (DNS). Which is a network of servers that acts like a phonebook to find the IP address of the site you have typed into your browser.


Every device connected to the internet has something called an IP address, which is a numerical label, e.g., 192.0.2.1, that can be used to uniquely identify the device. For an everyday user, it is hard to remember the IP address of all the sites they want to visit — for example, you can access google.com by typing 172.217.194.102 on your browser’s search bar.


DNS helps to resolve this exact problem. You can enter domain name on your search bar, the connection goes to DNS, which returns the IP for the server of the site you wanted access, to your device. The device connects to the server using the IP. The server will return the content your URL is supposed to serve, your browser will render it on your screen.


An illustration of how the internet works


Having a good mental model around the internet/web, and how it works is essential for understanding and building things on the web, so that it is built with the intention of communicating what a website intends to do. In the coming sections, I will guide you through how to build cool stuff on the web.