What Happens When You Perform an Online Search?

Understanding DNS Resolution for Online Queries

What Happens When You Perform an Online Search?

Every time you type something into a search bar, magic 🪄 happens, and voila!. In less than a second, you get answers, links, and suggestions tailored just for you. Behind that swift 🏎️ response lies an interesting process. Let’s explore what really happens when you make a search 🔎.

Imagine embarking on a long drive. Your journey begins at your browser (home 🏡) and ends at the Authoritative Name Server (Destination).

by opening a browser (such as Chrome / Safari) and entering a domain name (e.g. example.com).

Domain Name
A domain name is a website’s address that humans 👨‍💻can easily understand and remember. Computers, however, require an IP address to locate and access the website your are searching for.

Once you’ve entered the domain name, the hard part is done, and you won’t need to do anything further. Just sit back and watch the magic happen.

The search will be completed in a second or less provided,
that your Internet Service Provider (ISP) offers sufficient bandwidth (the amount of data that can be transferred per second e.g., 50mbps) or you haven’t exceeded your daily data cap (the limit of total data you can use per day or month). Otherwise, the search may take a long time to complete.

Internet Service Provider

You can type something into a search bar of any browser without internet connection, but it won’t take you anywhere 🛑. You will be stuck looking at a screen 💻 that looks like this:

That’s where ISPs come in; they help you to connect with the world of the Internet. A few examples of Internet Service Provider are JIO, Airtel and VI.

ISPs provides you with internet access.

Once you connect your device to the internet to use its services, your search will be directed to the DNS.

Domain Name Service and IP Address

When you enter a Domain Name in your browser. It does not know where to go because it does not have the address of website in a form it can understand. It needs to convert the domain name into an IP address.

Analogy
Everyone has two names - one that only your family knows (your nickname) that is easier to remember and use, which can be considered as the domain name, and a real (official) name that everyone knows, which is like the IP address, your real identity in official systems.

The browser requests the DNS (Domain Name Server), also called the DNS Resolver, to convert the domain name into an IP address because computer use IP addresses to communicate with each other.

The DNS will help you to find the IP Address (Internet Protocol Address), which is a unique set of numbers e.g. 123.456.7.8, that serves as the full address of the website you’re searching for.

If DNS Resolver has the IP address cached ( Cache is a temporary memory to store information ), it will provide it to the browser. Otherwise, it will make further requests to find the IP address of the required webpage.

DNS and Cache
If it’s more than one request, then IP address can be find in the cache memory. Otherwise, DNS will find the IP address by making further requests, which is a longer procedure described ahead.

Here comes the new hero in the story: the Root Name Server.

Root Name Server

In simple terms, a Root Name server acts as a navigator. It helps direct the DNS Resolver to the next step in finding the IP address by providing the IP address of TLD server.

Fun Facts 🍄‍🟫

  • There are 13 Root Name Servers globally which are labelled from A - M organized by 12 Independent organizations. These are not 13 individual physical Machines.

  • These servers have multiple copies distributed globally using a technology called Anycast. Anycast allows a single IP address to assign at multiple servers spread around the world.

  • If one Root Name Server is unable to answer then DNS will requests other nearest Root Name Server to ensuring redundancy and reliability using Anycast Routing Technique.

Top Level Domain

Once Root Name Server sends the IP address of TLD (Top Level Domain) to the DNS it will then send the request to TLD to find the directory (server) of specific Top Level Domain.

When you searched example.com. The last part of the URL (Uniform Resource Locator) after the last dot (.com) is named as Top Level Domain.

There are various kind of Top Level Domains such as .com, .in, .uk, .gov, .ai etc. Each TLD is saved at different server like in the library books are stored in a sorted way in various directories according to their genre. TLD’s are also sorted that way.

So, In our case TLD will look up the .com directory and It will send the IP address of ANS (Authoritative Name Server) to the DNS Resolver.

Authoritative Name Server

Have you heard about GoDaddy.com ?🤔

It is an Authoritative Name Server and there are so many ANS’ in the market. It is the final destination that will give you the IP address of your searched item.

In our case we are looking the owner of example.com hence whichever ANS server is owner of our domain name, will send the IP address to DNS Resolver.

Finally

ANS will response the request of DNS with the IP Address. Further, DNS will give the IP address to the Browser and it will provide you the website.

Cache
DNS will also save it in cache memory so it will not need to repeat the whole process again to save time and faster results until the cache memory does not expires or is deleted manually by the end user (you 🫵🏽).

Conclusion

In summary, DNS Resolution make it easy for you to remember the domain names because it spares you from having to remember the IP addresses. You just need to search a domain name and it will convert it with IP address using it’s components such as Root name server, Top Level Domain Name and ANS to make it understandable for the browsers and it also saves it in cache after first attempt to find the required result to make user experience faster and fun.😁