By Barbaros Küçükpınar

DNS is one of the fundamental building blocks of the internet. The process of translating a domain name into an IP address often remains abstract for many users. In this article, we walk through the DNS resolution process step by step, from the client to the authoritative DNS server, including all cache control points along the way.

DNS Resolution Flow

Client → Resolver → Root DNS → TLD DNS → Authoritative DNS

Scenario

  • Queried domain: barbaroskucukpinar.com
  • Client: User's computer
  • DNS Resolver: 8.8.8.8
  • Domain DNS provider: GoDaddy
  • Goal: Resolve the IP address of barbaroskucukpinar.com

DNS Resolution Process

1. Client DNS Cache Check

The client first checks its local DNS cache stored in memory.

  • If a valid record exists and the TTL has not expired, the IP address is used directly
  • The DNS resolution process ends at this stage

If no record is found, the process continues with the hosts file check.

2. hosts File Check

The client checks the operating system's hosts file.

  • If the domain is defined in the hosts file, no DNS query is sent
  • The IP address defined in the hosts file is used
  • The process ends here

If no record exists, the client sends a DNS query to the DNS resolver.

3. DNS Resolver Cache Check (8.8.8.8)

The client sends the DNS query to the resolver at 8.8.8.8.

The resolver checks its own cache.

  • If a valid record exists, the IP address is returned to the client
  • The process ends at this point

If no cached record is found, recursive DNS resolution begins.

4. Root DNS Stage

The resolver queries one of the root DNS servers with the following question:

"Which DNS servers are responsible for the .com TLD?"

Root DNS servers:

  • Do not store IP addresses
  • Do not maintain domain-to-IP mappings
  • Only provide direction at the top-level domain level

Since no IP address is returned, the resolver selects one of the provided TLD DNS servers and continues.

5. TLD DNS Stage (.com)

The resolver queries the selected .com TLD DNS server:

"Which DNS servers manage the domain barbaroskucukpinar.com?"

TLD DNS servers:

  • Know which authoritative DNS servers manage the domain
  • Do not store IP address information

At this stage, the resolver receives a list of authoritative DNS servers (for example: ns1.godaddy.com, ns2.godaddy.com)

Since no IP address is returned, the resolver proceeds to the next step.

6. Authoritative DNS Stage

The resolver queries the authoritative DNS server:

"What is the IP address of barbaroskucukpinar.com?"

The authoritative DNS server responds with:

  • The A or AAAA record for the domain
  • TTL information

At this stage, the IP address is successfully resolved and the DNS resolution process ends.

Caching and Response

  • The resolver caches the IP address for the duration of the TTL
  • The client stores the IP address in its local DNS cache
  • The browser initiates a connection to the resolved IP address

The DNS resolution process is now complete.

Role Summary

Root DNS

  • Does not store IP address information
  • Provides top-level domain redirection only

TLD DNS

  • Knows which authoritative DNS servers manage a domain
  • Does not return IP addresses

Authoritative DNS

  • Returns the final IP address for the domain
  • Represents the final step in DNS resolution

DNS resolution is a fundamental process that occurs behind the scenes during every internet request. Thanks to caching mechanisms, this process is typically completed within milliseconds and remains completely transparent to the user.

🇹🇷 Bu yazının Türkçe versiyonu: 🔗 DNS Çözümleme Süreci: Client'tan Authoritative DNS'e Adım Adım