Skip to content

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