0.2.Dns
π§© Introduction
As mentioned earlier, the purpose of the DNS (Domain Name System) is to make accessing websites easier.\
Instead of memorizing each websiteβs IP address, we simply use a domain name like google.com
But the question is π\ How does this system actually work?
π First: Components of the DNS System
Before understanding the process, we need to get familiar with a few key terms:
π§ 1. Recursive Resolver (or Recursive DNS Server)
-
This is the server that belongs to your Internet Service Provider (ISP).
-
Its role is to search for the IP address of the domain you type into your browser.
-
In other words, it starts the lookup process step by step on your behalf.
π 2. Root DNS Nameserver
-
There are 13 main Root Servers around the world.
-
They are considered the backbone of the DNS service across the Internet.
-
Each one contains information about all Top-Level Domains (TLDs) such as:
-
.com -
.net -
.org -
and others.
π·οΈ 3. TLD (Top-Level Domain DNS Nameserver)
-
These servers contain the addresses of the servers responsible for specific domains.
-
They point to the server that actually holds the final IP address.
-
These are usually called Authoritative Nameservers.
π₯οΈ 4. Authoritative Nameserver
-
This is the server responsible for storing the real IP address of the domain.
-
When the request reaches it, it responds with the final IP address of the website.
π Illustration of the DNS Query Process :
User β Recursive Resolver β Root Server β TLD Server β Authoritative Server β IP Address
π Second: DNS Records
Each domain contains a set of records, each with a specific purpose:
| Record Type | Description |
|---|---|
| A Record | Contains the websiteβs IPv4 address. |
| AAAA Record | Contains the websiteβs IPv6 address. |
| CNAME Record | Used when a domain is an alias for another domain. |
| MX Record | Contains the Mail Server address used for email. |
| TXT Record | Contains notes or settings such as SPF Records for email authentication. |
| SOA Record | Contains information such as the administratorβs email address. |
| NS Record | Points to the domainβs Authoritative Nameserver. |
π§ Third: Domain Information Gathering
πΉ 1. Get basic information about a domain:
nslookup yahoo.com
πΉ 2. Get details for a specific record (e.g., MX):
nslookup -type=MX yahoo.com
πΉ 3. Using the dig tool (more detailed):
π To retrieve all available information:
dig yahoo.com any
π To retrieve a specific record type (e.g., MX only):
dig yahoo.com MX
π To display the full query trace:
dig +trace yahoo.com
π 4. Useful Tools
πΈ DigWebInterface : https://digwebinterface.com/
An online website that allows you to perform the same dig commands easily and retrieve information about any domain.
π§Ύ Fourth: WHOIS Information
The WHOIS service provides detailed information about a domain, including:
πΈ whoIs: https://who.is/
-
Ownerβs name
-
Email address
-
Creation and expiration dates
-
Registrar company (the organization responsible for registering the domain)
πΉ Example:
whois yahoo.com