π 1. Basics of DNS
What Is DNS?
The Domain Name System (DNS) is the Internet’s phonebook. It translates human-friendly domain names (like www.example.com
) into IP addresses (like 192.0.2.1
) that computers use to identify each other on the network.
How DNS Resolution Works
When you enter a URL into your browser, the DNS resolution process unfolds as follows:
- Recursive Resolver: Your device queries a recursive DNS resolver, typically provided by your ISP or a public DNS service.
- Root Name Server: The resolver contacts a root name server, which directs it to the appropriate Top-Level Domain (TLD) server (e.g.,
.com
,.org
). - TLD Name Server: The resolver then queries the TLD server, which provides the authoritative name server for the specific domain.
- Authoritative Name Server: Finally, the resolver contacts the authoritative name server, which returns the IP address associated with the domain name.
- Caching: The resolver caches this information for a duration specified by the Time to Live (TTL) value to expedite future requests.

Image Source: ResearchGate
π 2. DNS Record Types
DNS records are instructions stored in DNS servers that provide information about a domain. Here are some common types:
Record Type | Purpose | Example |
---|---|---|
A | Maps a domain to an IPv4 address | example.com β 192.0.2.1 |
AAAA | Maps a domain to an IPv6 address | example.com β 2001:db8::1 |
CNAME | Alias of one domain to another | www.example.com β example.com |
MX | Mail exchange; directs email to a mail server | example.com β mail.example.com |
TXT | Holds text information, often for verification | example.com β "v=spf1 include:_spf.example.com ~all" |
SRV | Specifies a port for services like SIP or XMPP | _sip._tcp.example.com β sipserver.example.com:5060 |
NS | Indicates authoritative name servers for the domain | example.com β ns1.example.com |
SOA | Start of authority; provides administrative information about the zone | Contains details like the primary name server, email of the domain admin, domain serial number, etc. |

Image Source: ASMED
π 3. TTL and DNS Propagation
What Is TTL?
Time to Live (TTL) is a value in a DNS record that tells DNS resolvers how long to cache a query before requesting a new one. It’s measured in seconds.
- High TTL (e.g., 86400 seconds / 24 hours): Reduces load on DNS servers but delays propagation of changes.
- Low TTL (e.g., 300 seconds / 5 minutes): Allows quicker propagation of changes but increases DNS query traffic.
DNS Propagation
When a DNS record is updated, the change doesn’t take effect immediately across the Internet. Instead, it propagates as cached records expire based on their TTL values.

Image Source: ClouDNS
π 4. Public vs. Private DNS
Public DNS
- Accessible to anyone on the Internet.
- Used to resolve domain names of public websites.
- Examples: Google Public DNS (
8.8.8.8
), Cloudflare (1.1.1.1
).
Private DNS
- Restricted to a private network.
- Used within organizations to resolve internal hostnames.
- Enhances security by preventing exposure of internal DNS records.

Image Source: NordLayer
π 5. Reverse DNS (PTR Records)
What Is Reverse DNS?
Reverse DNS (rDNS) translates an IP address back into a domain name, the opposite of the usual DNS lookup.
PTR Records
- Pointer (PTR) records are used for reverse DNS lookups.
- They map an IP address to a domain name.
- Commonly used in email servers to verify the domain name associated with an IP address, helping to prevent spam.

Certainly! Here’s a comprehensive explanation of how the Domain Name System (DNS) works, accompanied by a detailed diagram to illustrate the process.
π How DNS Works: Step-by-Step Explanation
The Domain Name System (DNS) functions as the Internet’s phonebook, translating human-readable domain names (like www.example.com
) into machine-readable IP addresses (like 192.0.2.1
). This translation is essential for locating and accessing websites.
π DNS Resolution Process
When you enter a URL into your browser, the DNS resolution process unfolds as follows:
- Browser Cache Check: The browser checks its cache to see if it has recently resolved the domain. If found, it uses the cached IP address. (DNS Resolution Process | Cycle.io)
- Operating System Cache Check: If not in the browser cache, the operating system checks its own cache. (DNS Resolution Process | Cycle.io)
- Recursive DNS Resolver Query: If the IP address isn’t cached locally, the query is sent to a recursive DNS resolver, typically provided by your Internet Service Provider (ISP). (DNS Resolution Process | Cycle.io)
- Root Name Server Query: The resolver queries a root name server, which responds with the address of the appropriate Top-Level Domain (TLD) name server (e.g.,
.com
,.org
). - TLD Name Server Query: The resolver then queries the TLD name server, which responds with the address of the domain’s authoritative name server.
- Authoritative Name Server Query: The resolver queries the authoritative name server, which responds with the IP address of the requested domain. (How does the Domain Name System (DNS) lookup work?)
- Response to Client: The resolver returns the IP address to the browser. (DNS Resolution Process | Cycle.io)
- Website Access: The browser uses the IP address to access the website. (Como funciona o DNS? – ManageEngine Blog)
Throughout this process, each server caches the response for a duration specified by the Time to Live (TTL) value, improving efficiency for future queries.
πΌοΈ DNS Resolution Diagram
To visualize this process, here’s a diagram illustrating each step of the DNS resolution:

Image Source: ResearchGate
Understanding this process is crucial for anyone working with networked systems, as DNS plays a vital role in the functionality of the Internet.
If you have further questions or need more detailed explanations on any part of this process, feel free to ask!
Iβm a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND