What is DNS ?
Before understanding the DNS (Domain Name System) we should understand about IP Addresses.
In a College every student has a unique roll no. which helps in uniquely identifying the student just like this every website has its own unique value which is known as IP Address(e.g. 192.0.2.1).
However, remembering these numerical IP addresses for every website we visit would be impractical for humans.
This is where the concept of DNS comes to action , it acts as a “phonebook” of the internet. It converts human-readable domain names (like example.com) into machine-readable IP addresses (like 192.0.2.1). This way, you don't have to remember the IP addresses of websites; you just use the domain name, and DNS resolves it to the corresponding IP address.
For example:
- When you type google.com in your browser, DNS translates it into the IP address 142.250.185.78, allowing your browser to connect to Google's servers.
To summarize:
DNS = System that maps human-friendly domain names to IP addresses.
IP Address = Unique identifier for each device on the internet.
Understanding the DNS Hierarchy
When you type a website like google.com into your browser, a lot of processes happen behind the scenes to load the website for you. The DNS hierarchy can be visualized as a multi-layered structure, with each layer playing a distinct role in resolving domain names.
Here's an explanation of each part of the DNS hierarchy:
1. Root
Represented by a single dot (
.
), the root is the top-level component of the DNS hierarchy.It serves as the starting point for all domain names and connects to the Top-Level Domains (TLDs).
2. TLD (Top-Level Domain)
Directly below the root in the hierarchy.
Includes domains like
.com
,.net
,.org
, and country-specific domains like.us
,.uk
, etc.Managed by organizations like ICANN (Internet Corporation for Assigned Names and Numbers).
3. Domain
Located below the TLD, this part specifies the unique registered domain name.
For example, in
google.com
,google
is the domain.This part is often purchased and managed by website owners.
4. Hostname or Subdomain
Represents specific services or hosts under the domain.
Examples include
www
(for web servers),ftp
(for file transfer services), ormail
(for email servers).The hostname is optional but commonly used to differentiate services.
Example of a Full FQDN (Fully Qualified Domain Name):
-
www
→ Hostname or Subdomaingoogle
→ Domain.com
→ TLD.
→ Root
The DNS resolves these names into IP addresses so that users can access services hosted on the internet in a human-readable format.
Why the DNS Hierarchy Matters
Efficiency: The hierarchical design distributes responsibility, making DNS lookups faster and more efficient.
Scalability: The system can support the massive and ever-growing number of domain names on the internet.
Redundancy: Multiple root and TLD servers ensure the DNS system is fault-tolerant and highly available.
Security: DNSSEC (Domain Name System Security Extensions) can be implemented at different levels to protect against spoofing and other attacks.
Summary
The Domain Name System (DNS) acts as the internet's "phonebook," translating human-readable domain names into machine-readable IP addresses to facilitate website access. It's structured hierarchically, consisting of four main parts: the root, Top-Level Domains (TLDs), domains, and hostnames. Each layer plays a crucial role in efficiently and securely resolving domain names, supporting scalability, and ensuring redundancy. Understanding this hierarchy helps in comprehending how DNS manages the vast and growing number of domain names while maintaining high availability and security.