The scenes behind visit website :part I

Amina laabidi
2 min readJun 5, 2021

Have you ever wondered that waht happens when you type an URL in the browser and visit a website

let’s say you have entered:https://aminalaabidi.medium.com/ Grammer in the browser

Browser first checks the cache for the DNS record to find the correspoding IP address of our URL.

For this, browseer performs the 4 levels of cache:

  1. browser cache
  2. Os cache
  3. Router cache
  4. ISP cache

What the heck in this DNS record?

In simple terms a DNS record is nothing but the pair which describes the particular URL and it’s associated IP adress

DNS (Domain Name System) is a database that maintains all these DNS records.

Okay ,but why there is a need of DNS?

Can’t we access website directly from IP address

Yes , you can, but it is not practially possible for us humans to remember each IP address of all the websites.That’s why DNS is used.

So the primary purpose of DNS is human-friendly navigation.

ok , so continuing to our example, if the browser finds the DNS record in any one of the cache then now it can simply initiate the request.

But if the browser does not find the cache in any of the cache level, then your ISP DNS Server initiates a DNS query to find the IP address of the server that hosts

https://aminalaabidi.medium.com

The pupose of a DNS query is to search multiple DNS servers on the internet until it finds the correct IP address for the website.

DNS Hierarchy

DNS Hierarchy image

The under diagram is about how DNS hierarchy works and how DNS query is resolved ,if the request is successful, then it returns the IP address back to the browser.

DNS Hierarchy diagram

--

--

Amina laabidi

I am a full-stack web developer javascript specialist Front-End