(Not) Stupid Question: What happens when you enter an URL into the browser?

Don’t quite understand what happens when you “go to” a website? Confused as to where the cloud/web/net lives? Do you want to ask the (not) stupid question, what happens when you enter an URL into the browser?

For simplicity we are going to assume this is a basic HTML-based web page.

Enter URL -> Browser Displays Web Page
Very simple, you enter an URL and your browser display a webpage. Where does the web page come from?

Enter URL -> Receive HTML -> Browser Displays Web Page
Ah, so you receive the HTML information to display in the browser. Wait, where do you get the HTML from?
Note: HTML stands for Hyper Text Mockup language. Think of it as a structure on how to display web pages.

Enter URL -> Browser Initiates TCP connection to Web Server -> Receive HTML
That makes sense, you enter an URL, you connect to the server, download the HTML and display the HTML. Hold on, aren’t server addresses like 102.42.128.1?
Note: TCP, or Transmission Control Protocol, is the protocol used to communicate to and transfer packets with web servers. The connection initiation process is called a 3-way handshake and involves communicating using specific bit flags in a packet.

Enter URL -> Browser Queries DNS for IP Address of Domain -> Browser Initiates TCP connection to Web Server
Ok I get it, the Browser extracts the domain from the URL, then the Browser ask the DNS for the IP address of the domain and the DNS returns the IP Address to the browser.
Note: DNS stands for Domain Name Server. Think of it like a translation service that requires domain names as input and returns IP addresses as output. Your browser specifies which DNS it sends queries to.
Note: IP address stands for Internet Protocol address. It is a numerical labeled assigned to every device that is connected to the internet and is the address portion of how you speak to other devices on the internet.

Final process…
Enter URL -> Browser Queries DNS for IP Address of Domain -> Browser Initiates TCP connection to Web Server -> Receive HTML -> Browser Displays Web Page

Though this is a high level overview as each of these steps can be broken down to many, many more steps.

TL;DR: You just enter URLs and magically web pages appear 😉

Leave a Reply

Your email address will not be published. Required fields are marked *