Skip to main content

Command Palette

Search for a command to run...

How DNS Resolution Works: From Domain Name to IP Address

Updated
6 min read

Think about this for a moment.

You open a browser and visit a website like kartikeynarayan.in on your mobile phone, laptop, or any other device. The website loads instantly, without you needing to think about what happens behind the scenes.

But have you ever wondered how your browser actually reaches the website you requested?

Computers or browsers do not understand the domain name. They communicate using IP addresses, which tell them exactly where to go.

So before the website loads, something very important happens in the background:

kartkeynarayan.in → convert it into → 192.1.2.1

So that process, which is running in background which convert the domain name to an IP address is called DNS resolution.

Now, let’s dive deeper into DNS resolution and understand how this process works under the hood.

Internet Phone Book

To understand DNS resolution, we first need to clearly understand what DNS means?

As discussed earlier, DNS converts a domain name into an IP address so that the browser knows where to go and can load the website. Browsers and computers communicate using IP addresses, not domain names.

You can think of DNS as the internet’s phonebook.

Just like a phonebook contains names and their corresponding phone numbers, DNS contains domain names and their corresponding IP addresses in form of different DNS record types. These entries guide the browser by providing instructions on how to reach the final destination.

DNS exists because remembering IP addresses is not practical for humans. Instead of memorizing numbers like 192.1.2.1, we use easy-to-remember names like kartikeynarayan.in, and DNS handles the translation in the background.

But here the catch, even we are thinking that it is a simple task, converting a domain name to IP address, multiple systems and servers work together behind the scene.

So, a natural question arises:

“Who is Involved in DNS Resolution?”

Who is Involved in DNS Resolution?

Before understanding DNS resolution, how the process works and how the conversion happens between the client and the server. We first need to identify the key players involved.

Think of it like a match. Every match has players, and each player has a specific role. If we know the players and their roles in advance, it becomes much easier to understand what happens during the game.

When you type a domain name into a browser, several components (players) work together to convert that domain name into an IP address. The browser then uses this IP address to reach its final destination.

The key players involved are:

  • Browser – Starts the request.

  • Operating System (OS) Cache – Checks if the answer is already known.

  • Recursive DNS Resolver – Finds the answer on behalf of the browser.

  • Root DNS Server – Knows where top-level domains live.

  • TLD DNS Server – Handles domains like .com, .in, .org, and many more.

  • Authoritative DNS Server – Stores the final DNS records.

This whole thing ensures that DNS queries are resolved efficiently and reliably.

Now, another natural question arises:

“How does this process actually work under the hood?”

How does this process actually work under the hood?

Now we have reached where everything becomes interesting.

This is the moment when we finally see what actually happens behind the scenes when you visit a website like kartikeynarayan.in on our browsers.

Although the page loads in a second, several systems and components work together very quickly and very quietly.

Let’s walk through this journey step by step.

  • Browser Check:

    When we type kartikeynarayan.in into the browser and press Enter, the browser doesn’t immediately ask the internet.

    First, it asks itself:

    “Do I already know the IP address for this domain?”

    Browsers store recently resolved domain names in a DNS cache. If the browser finds the IP address here, the process stops immediately and the website loads faster. If not, the browser moves to the next level.

  • OS Cache Check

    When we are here, the browser asks the operating system:

    “Have you resolved this domain recently?”

    The operating system also maintains its own DNS cache, shared by all applications on the system.

    • If the OS finds the IP address, it returns it to the browser.

    • If not, the request moves forward to the next component or server or system.

If there is still no answer?
Then the real DNS journey begins from this point.

  • Recursive Resolver

    Now the request is sent to a recursive DNS resolver.

    The browser’s message to the resolver is simple:

    “Please find the IP address for kartikeynarayan.in.”

    From this point onward, the resolver takes full responsibility. The browser waits, and the resolver does all the hard work.

  • Root DNS Server

    The recursive resolver doesn’t know the answer yet, so it starts at the top of the DNS hierarchy which is the starting point of the internet.

    It asks a root DNS server:

    “Do you the IP address of kartikeynarayan.in?”

    The root server doesn’t know the IP address of the website. Instead, it responds with a direction:

    “I don’t know the IP address, but I know who manages .in domains.”

    It then points the resolver to the TLD DNS server.

  • TLD DNS Server

    Now, The resolver contacts the Top-Level Domain (TLD) DNS server for .in domain.

    The resolver asks:

    “Do you the IP address of kartikeynarayan.in?”

    The TLD server replies:

    “I don’t know the IP address, but this is the authoritative DNS server for that domain.”

    Now the resolver knows exactly where to go next.

  • Authoritative DNS Server

    The resolver now contacts the authoritative DNS server for kartikeynarayan.in. This server holds the actual DNS records.

    The resolver asks:

    “Do you the IP address of kartikeynarayan.in?”

    The authoritative server responds with the final answer:

    Yes, I know the IP address of kartikeynarayan.in, here the details

    • A record → IPv4 address

    • AAAA record → IPv6 address ( in case of IPv6 IP address )

This is the source of truth.
No more guessing.

  • Response to Browser

    Now something important happens. The answer travels back the same path it came from:

    • Authoritative server → Recursive resolver

    • Recursive resolver → OS

    • OS → Browser

At each level, the IP address is cached for future use (based on TTL). This means the next request will be faster.

  • Browser Loads the Website

    Finally, the browser has what it needs.

    It uses the IP address to:

    • Connect to the web server.

    • Send an HTTP/HTTPS request.

    • Download HTML, CSS, JavaScript, images.

And the website appears on your screen. All of this happens in milliseconds.

Big Picture

After understanding the data flow from the starting point to the final destination and back again, the bigger picture becomes clear.

DNS works smoothly because:

  • Caching reduces repeated work.

  • Responsibility is clearly divided between servers.

  • The system is hierarchical and scalable, allowing it to grow as needed.

  • Recursive resolvers do the heavy lifting on behalf of the browser.

It looks like magic is actually a well-designed, recursive lookup system working quietly in the background.

Now it becomes clear and understandable that when you type a domain name into your browser, DNS doesn’t guess. It asks the right questions, in the right order, until it reaches the source of truth then delivers the answer back to you.

And that’s how a simple name like kartikeynarayan.in turns into a real website on our screen.