DNS Magic And Internals

Introduction
Have you ever wondered how does a Server find a web page in its memory because computer can only understand 0 and 1 . For this case DNS is used so that server can find the web page and send it to the Users.
What is DNS ?
DNS Stands for Domain Name System . It is a naming system for devices that are connected to the Internet. DNS is used to translates human readable domain name like www.google.com into an IP Address like 192.0.2.1 . that computer use to identify other computers on internet.
Why DNS is important ?
DNS is a critical component of the internet because it acts as a phonebook that translate human readable domain name like www.google.com into an IP Address like 192.0.2.1 .
Here are some reasons why DNS is important
It simplifies the Internet access.
It increases the efficiency and speed.
It enhances the network reliability.
Enables the scalability of the Internet.
Improves security
Facilitate customization and parental controls.
So we can say that without DNS the internet will be difficult to use, slower, less secure, and less reliable. It makes the online experience seamless, secure and scalable.
Types of DNS Servers
Recursive DNS Resolver - Intermediary server that queries DNS records on behalf of clients.
Root Name Server - Directs queries to the correct TLD name server.
TLD Name Server - Directs the queries to autoreactive name servers for a domain.
Authoritative Name Server - Stores DNS records and provides the final IP address.
Types of DNS Records
DNS records store information about a domain and are used for various functions.
The most common types include:
A Record (Address Record) – Maps a domain to an IPv4 address.
AAAA Record – Maps a domain to an IPv6 address.
CNAME Record (Canonical Name Record) – Maps an alias domain to a canonical domain.
MX Record (Mail Exchange Record) – Directs email to mail servers.
TXT Record – Stores arbitrary text data, often used for security (e.g., SPF, DKIM, DMARC).
NS Record (Name Server Record) – Specifies the authoritative name servers for a domain.
PTR Record (Pointer Record) – Used for reverse DNS lookups (IP to domain).
SRV Record (Service Record) – Specifies the location of specific services.
SOA Record (Start of Authority) – Contains domain administration details.
How DNS Works
When you enter a website URL in your browser, the DNS process occurs in the following steps:
DNS Query Initiation
A user types a URL (e.g.,
www.google.com
) into the web browser.The browser checks its local cache for the IP address.
If not found, the request is sent to the DNS resolver.
Recursive DNS Resolver
The resolver is typically provided by the user's ISP (Internet Service Provider) or third-party DNS services like Google DNS (
8.8.8.8
), DNS (1.1.1.1
), or OpenDNS.If the resolver has the IP address cached, it returns it immediately.
Otherwise, it queries the DNS Root Server.
Root Name Server
- The root server does not contain the IP address but directs the resolver to the correct Top-Level Domain (TLD) Name Server based on the domain extension (
.com
,.org
,.net
etc.).
- The root server does not contain the IP address but directs the resolver to the correct Top-Level Domain (TLD) Name Server based on the domain extension (
TLD Name Server
- The TLD server (e.g.,
.com
Name Server) directs the request to the appropriate Authoritative Name Server.
- The TLD server (e.g.,
Authoritative Name Server
- The authoritative DNS server contains the actual IP address of the domain and returns it to the resolver.
Website Access
The resolver sends the IP address to the browser.
The browser connects to the website’s server using the IP address.
The website loads.
DNS (Domain Name System) is essential for internet functionality, translating human-readable domain names into IP addresses, much like a phonebook for the web. It improves internet access by enhancing speed, reliability, security, and scalability. DNS involves various server types, including Recursive DNS Resolvers, Root Name Servers, TLD Name Servers, and Authoritative Name Servers, each playing a role in directing queries to retrieve the correct IP address for a domain. This process ensures seamless website access and supports various DNS record types like A, CNAME, and MX, which serve different functions within the system.
Subscribe to my newsletter
Read articles from Navjot Chauhan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
