Search
  • Daniel Okwufulueze

What Exactly Happens When You Enter A Web Address Into Your Browser?

Updated: Jan 21

Imagine if someone answered like below:


Hehe ... Simple and straightforward ... Assuming no caching, the browser (client) passes the web address to an ISP-issued recursive resolver, which then makes iterative IP lookup requests to DNS servers like the root name server, the top-level domain (TLD) name server, and the authoritative name server until the IP address for the entered domain name is found. Once the domain name is resolved (the corresponding IP address is known), the browser makes a direct HTTP request to the server at that IP address ... The server then responds with web content ... and the browser displays the web content to the user. The End!


Wait ... WHAT???


Don't worry, you can come back to read that so-called "simple and straightforward" answer after reading this post to the end and it should make sense.


Let's begin!



Tip: For this post, you can think of client and server as computers or applications running on a computer.

To understand what really happens when you enter a web address like www.danielokwufulueze.com into your browser's address bar, let's clarify some very common terms, like those you saw in the so-called "simple and straightforward" answer at the top of this post.

Before we move on, let's set some expectations. In this post, I'll be explaining the internal steps that ultimately result in the presentation of web content when a user enters a website name into their browser's address bar. My goal is to keep it as simple as possible.

There's also a bonus tip at the end.

A Closer Look At www.danielokwufulueze.com



In the website name www.danielokwufulueze.com, there are three strings or parts separated by the dot - www, danielokwufulueze, and com.

Two of these strings (www and com) are most likely familiar to you as you'd have noticed them in many other website names - for example, www.google.com, www.facebook.com, etc.


While English reads from left to right, website names are read from right to left (com, danielokwufulueze, www). That said, let's discuss the three parts.


Website names depict levels containing other levels - much like onion layers
Fig. 1: Website names depict levels containing other levels - much like onion layers

  1. com is called a Top-level Domain (TLD): it's the first of the dot-separated parts - if you read the website name from right to left, of course.

  2. danielokwufulueze is called a Domain: it is contained within the com domain.

  3. www is called a Subdomain: it is contained within the danielokwufulueze domain.


Observe that the parts are all some kind of domain. Think of a domain simply as a space within the internet where entities have the same suffix. For example, all the entities within the com domain (like Twitter, Medium, Youtube, etc), always end with .com - twitter.com, medium.com, youtube.com. All the entities within the org domain (like UN, Red Cross, etc) end with .org - un.org, redcross.org. And so on.

Back to www.danielokwufulueze.com, when put together, the parts uniquely identify or represent the location or an address of a computer somewhere containing the web content and stuff you see when you visit www.danielokwufulueze.com with your device (computer or phone, for example).


But the funny thing is that the string of characters (www.danielokwufulueze.com) actually makes no sense to computer devices, it is only for human memorability and identifiability. What would make sense to a computer could be an equivalent numeric representation for www.danielokwufulueze.com - like 11.11.11.11, for example. This numeric representation is called an IP Address.


IP Address ... Like An Actual Address?


Yes, it's an actual address that could be compared to the address of your house, but in this case, it's the address of a device (a computer or an application running on a computer) within the internet space. Just as your home address uniquely identifies your location and tells people where to send your letters to if they need to reach you via letters, a computer's IP address tells other computers where to reach it if they need to send messages (requests) to it.

IP addresses are 4 numbers separated by dots. Each number is in the range of 0 to 255. So, 0.0.0.0 and 255.255.255.255 are valid IP addresses.


But What On Earth Is An IP?


IP is an abbreviation for Internet Protocol. "Internet" is a global network of computers. "Protocol" has the same meaning as in normal English usage - a set of rules or a system of rules governing some affair - just that, in this case, it's applied to the exchange or transmission of data between devices.

So we can easily see that IP (Internet Protocol) is simply the set of rules governing the exchange or transmission of data between devices on the internet or any other local network for that matter.

If the device you're currently using to read this post is connected to the internet, then it has an address within the internet space - just so you know 🙂


 

Now On To The Mapping System - DNS & Name Servers


As we've seen, computers don't make any sense of fancy sensible website names that we enter into our browsers. These fancy website names have to be represented by an IP for a computer device like your phone to make sense of it. The system that tells us what domain is represented by a particular IP address is called the Domain Name System (DNS). And the computer (server) that responds with the IP address that corresponds to a particular domain is called a Name Server.

So, with DNS in place, when we type in www.danielokwufulueze.com into our browser, we expect our browser to ultimately get the IP address of the computer known in the human-memorable form as www.danielokwufulueze.com. Once the browser gets this IP address, it then sends a direct web request (or HTTP request) to the computer at that IP address.

HTTP is an abbreviation for Hypertext Transfer Protocol. It's a set of rules for the transmission of data on the World Wide Web (www). The World Wide Web is the information retrieval service of the internet that gives users access to a massive collection of documents displayed as web pages on browsers.

Fig. 2 below gives a very simplified illustration of the browser-server situation.



Overly simplified illustration of a client-server web request flow.
Fig. 2: Overly simplified illustration of a client-server web request flow.

The Different Name Servers Associated With Fulfilling Your Browser's Request


For our simple case, there are four Name Servers that we need to know about:

  1. Recursive Resolver: This name server is the one in direct interaction with your browser. Your browser knows its IP address by default as it's issued by your Internet Service Provider (ISP). It receives the website name (www.danielokwufulueze.com) from your browser and begins a series of requests to the other three name servers in search of the IP address of the server (computer) that has the web content of www.danielokwufulueze.com.

  2. Root Name Server: This name server is responsible for getting the IP address of the Top-level Domain (TLD) name server responsible for top-level domains like com.

  3. Top-level Domain (TLD) Name Server: This name server gets the IP address of the Authoritative name server responsible for domain names within the TLD space like danielokwufulueze.com in our example.

  4. Authoritative Name Server: This name server is responsible for getting the IP address of www.danielokwufulueze.com in our example.

If you'd visited a website before, information about the server whose IP your browser made a direct request to could be saved so that, in the future, we wouldn't have to repeat the whole process from recursive resolver to the Root name server, to the TLD, and so on. This "saving" is known as Caching. Without caching, you'd expect the steps in Fig. 3 below (from step 2 through step 11) to be done.


With the information above, we can now finally take a look at the full range of steps involved in getting the web resources at the computer represented by the human-memorable string - www.danielokwufulueze.com. See Fig. 3 below.



Notice how the Recursive Resolver makes repeated IP lookup calls to other name servers - steps 3 to 7.
Fig. 3: Notice how the Recursive Resolver makes repeated IP lookup calls to other name servers - steps 3 to 7.

So What's Fig. 3 Telling Us?


Some points to recall before we explain Fig. 3

  • This is a case where nothing is cached about your request, so no step is skipped.

  • Name Servers typically respond with the IP address of the domain name they were asked to look up. This is because only IP addresses make sense to a computer trying to make a request to another computer. The computer making the request needs to know the IP address of the receiving computer, which is typically called a server.

  • Domain names are spaces where addresses share a common suffix. All com domains end with .com, all google.com domains end with .google.com like mail.google.com, www.google.com, etc.

Now, let's go through the steps that ultimately result in your browser showing you the web content of the website you entered into the address bar.

  1. You enter www.danielokwufulueze.com into your browser.

  2. Your browser hands over the string (www.danielokwufulueze.com) to the Recursive Resolver - your browser already has access to the Recursive Resolver from your ISP. Think of www.danielokwufulueze.com as a string split into three parts along the dots into com, danielokwufulueze, and www - remember to read the website name from right to left.

  3. com: The Recursive Resolver sends a request to the Root Name Server asking about the TLD Name Server responsible for com domains.

  4. The Root Name Server responds with the IP address of the TLD Name Server responsible for com domains.

  5. danielokwufulueze: The Recursive Resolver sends a request to the TLD Name Server identified by the IP address from step 4 above, asking about the Authoritative Name Server responsible for danielokwufulueze.com domains.

  6. The TLD Name Server responds with the IP address of the Authoritative Name Server responsible for danielokwufulueze.com domains.

  7. www: The Recursive Resolver sends a request to the Authoritative Name Server identified by the IP address from step 6 above, asking about the server or actual computer holding the web resources of www.danielokwufulueze.com.

  8. The Authoritative Name Server responds with the IP address of the server that has the web resources of www.danielokwufulueze.com.

  9. The Recursive Resolver, having reached the end of its domain lookups (at www), responds to your browser with the IP address of the server that has www.danielokwufulueze.com's web content.

  10. Your browser makes a direct HTTP request to the server identified by the IP address from step 8 above.

  11. The server responds to the browser with its web resources.

  12. Your browser then shows this content to you.

And, that's it!


 

Conclusion

Bonus Tip: Before the search process (in Fig. 3) for the IP address of the server that corresponds to www.danielokwufulueze.com begins, your computer is checked first to see if you had set an IP address for the website name locally. If you had, then that IP address is the one your browser would send a direct HTTP request to and there won't be any need to go through the DNS lookup process in Fig. 3.

Recall that at the top of this post, we had expected that you'd be able to read the so-called "simple and straightforward" answer after you're done with the post. Take a look at that answer again and see if it makes better sense to you now.

Does it?

Thank you for reading ... See you next time!

75 views0 comments

Recent Posts

See All