What happens when you type a URL - Behind the scene

What happens when you type a URL? – Behind the scene

Last Updated on April 13, 2025 by cscontents

Introduction

In this digital era accessing websites for various purposes has become an integrated part of our lives. We are heavily dependent on the web and the reason is that the websites or simply sites provide the required information or content at our fingertips.

But have we ever thought of what happens when we type a URL on the browser and hit enter? What exactly happens behind the scenes?

In this article, we will get to see this. If are someone into the tech industry or non-tech industry for both this article will be informative.

To explain the process, I will take a dummy website www.example.com, and show you the path it takes to reach the end server.

Prerequisite

You should know that a computer (PC or smartphone) does not understand anything about where to go by this simple URL www.example.com. In the world of computers, we assign an IP address to each computer/server to identify it.

There are two types of IP address –

  • Public IP address – This is the type of address that is required to make a computer or server publicly available. Basically, you need this public address to make your computer or server a part of the public network (which is nothing but the Internet).
  • Private IP address – This is the type of address that is assigned to a computer or server that is within a private network. A private network is one that belongs to some organization, company, or individual to securely connect to their computers and to provide isolation from public network (or) internet.

Now, for example, you have a website running on a server.

Let’s say, your server IP is 10.123.21.197

Now the problem is it is very difficult for us to memorize this IP address and every time someone wants to access your website, he needs to put this IP address in the browser – which is not an easy or user-friendly process. Also, how many IP addresses one can remember? Nowadays there are thousands of websites, and it will be very hectic to access each of them via IP address.

So, to avoid that there is something called DNS or Domain Name System. A DNS (Domain Name System) server is a server where we need to create records of the IP addresses and map them to some domain name (e.g. example.com) which is easily memorable for humans and easy to manage.

Now with the above knowledge let’s try to understand the steps or stages it goes through to bring you the content that you request via the URL.

What exactly happens behind the scenes when a URL is entered browser?

When you type the URL www.example.com in your smartphone browser or PC browser and hit enter to start the search process, basically you are sending a request or traffic to get the content of the site www.example.com, it starts to find out the assigned IP address to this website www.example.com.

Step 1: Look for IP in local cache memory

First, it checks or looks for the IP address in the browser cache memory. If it does not find the IP address here, then step-2 or step-3 is followed.

Step 2 (Not applicable for all networks or devices): Look for IP in Router

If you have home internet connectivity using Modem & Router, then the next place where the computer looks for the IP address is your “home router”. Usually “home router” acts as a DHCP server that assigns IP addresses to devices in your home network.

So, generally in most cases, if the IP address is not found in the browser cache (step-1), it will go to step-3.

Step 3: Look for IP in ISP’s DNS server

Next, the computer looks for the IP address in the ISP’s DNS server. ISP is your Internet Service Provider. For example, if your internet connection is from Vodafone, then it will check in Vodafone’s DNS server. In almost all cases IP address is found in the ISP’s DNS server.

But there could be a scenario (very rare case) where the IP address is not found in the ISP’s DNS server. In that case, step-4 and step-5 are followed.

Step 4 (Advanced step, might not be required in all cases): Look for IP in the DNS hierarchy – Root DNS server

If the IP address is not found in the ISP’s DNS server, then it goes to other DNS servers (DNS hierarchy).

Here, the first thing it does is it checks with the “Root DNS server”. There are a total of 13 root DNS servers in the world. Root DNS servers do not have the record or IP of www.example.com, rather they have the IP addresses of the Top-Level Domain servers (in this case, our top-level domain is, .com).

So, the Root DNS server replies to the ISP’s DNS server with the IP address(es) of Top-Level Domain servers.

Step 5: Look for IP in the DNS hierarchy – Top Level Domain Name Server | Authoritative Server

Once the ISP’s DNS server receives the IP address(es) of the Top-Level Domain servers from the Root Domain server, then it checks with the Top-Level Domain server.

Now, Top-Level Domain servers (in our case it is, .com) do not hold the record of specific websites like www.example.com,  rather they hold information about the authoritative domain server.

Authoritative Domain servers are the definite source of the DNS records of a particular domain (in this case, .com). The owner of example.com configures these authoritative domain servers with the DNS provider. On these authoritative name servers, A record (for IPv4 address) and AAAA record (for IPv6 address) are created that map the hostname or URL to its IP address.

Flow Diagram

URL reaching to server - Path

 

Thank you.

 

If you are interested in learning DevOps, please have a look at the below articles, which you might find informative.