Introduction to Domain Names and IP Addresses
Since we started using the Internet, we have visited websites only by typing their names (domain names) such as “youtube.com,” “google.com” without realizing the fact that this was a ‘shortcut’. Remember — the only thing a computer can understand is numbers. So, how do we access a website?
For a moment, just blindly copy this and paste it in your browser: 142.250.190.14
.
You’ll likely be surprised that Google's homepage is on your screen. Why did this happen?
The Need for Convenience: Why We Use Domain Names
Just like how each person has their own mobile number, all websites have something called an IP address (Internet Protocol address). Let’s ask ourselves a simple question — why was the "Contacts" feature added in mobiles, when we already have the dial pad and can directly type the number to call someone?
The reason: Convenience.
Remembering numbers: It’s impractical to remember every person’s phone number in your social circle.
People don’t even remember their own number properly. How can we expect to remember others'?
So, the Contacts feature acts as a database that stores your contact name along with the details. A person’s name is easier to remember, so when you press the contact name, the software retrieves the number from its database and calls the other person, instead of you manually typing it on the screen.
This is the same concept behind IP addresses.
DNS: Domain Name System Explained
DNS stands for Domain Name System. A domain name is like a personal name for a website. Each website has its own domain name. A domain name consists of three parts:
Top-Level Domain (TLD): This is the domain name to the right of the ‘.’, such as:
- .com, .net, .org, .edu, .gov
Second-Level Domain: This is the part of the domain name directly to the left of the TLD, such as:
google in google.com
example in example.net
Sub Domain :The prefix part used to organize website sections or services. For example, in
blog.example.com
, blog is the subdomain.
When we type the domain name of the website, the DNS replicates the phonebook scenario by retrieving the IP address of the website and displaying the contents on your screen. Let’s explore this technically further.
Decoding the DNS: Understanding the Hierarchy
DNS Resolver
When we send a request like google.com, the query is first sent to something called a DNS Resolver (think of it as a small phonebook provided by your ISP — Internet Service Provider, like Airtel or Jio — that stores a particular set of contact numbers).
If the IP address of the website is already in the DNS resolver’s cache (like a database), it’s retrieved and your browser redirects to that specific IP address.
But there’s no guarantee that the IP address for the website you typed will be present in your DNS resolver (just like you wouldn’t have everyone’s contact number in your phone).
Root Server: The First Step in the DNS Lookup Process
If the IP address isn’t in the resolver’s cache, the request is passed to something called the Root Server.
13 Root Servers are spread across the world, placed at strategic locations, and owned by large organizations. These servers collectively handle the request and render the website you typed on your screen, if the domain name exists.
You might wonder, why don’t we just add all the IP addresses into these servers?
Think about it — millions of people are browsing and surfing the internet at any given moment.
Overloading the servers by having each client (browser) request the IP addresses directly would cause delays in query processing and inefficient retrievals.
Efficiency is key! Adding layers of complexity helps improve performance. The Root Server directs the query to the appropriate TLD server.
TLD Servers: Increasing Efficiency
The Root Server extracts the website's Top-Level Domain name (like .com, .net, .org) and redirects the request to the corresponding TLD Server.
There are multiple TLD servers, such as one for .com, one for .net (similar to one phonebook per country).
Just as each person might have multiple phone numbers, one website can have multiple IP addresses.
However, the TLD Server can’t handle all the data in one place since it manages many websites under the same TLD. It then points to the Authoritative Name Server for that domain.
Authoritative Server: The Final Step in the DNS Resolution
The Authoritative Server holds the actual IP address of a particular website/domain name.
Under an Authoritative Server, there can be multiple IP addresses for a website.
- This ensures that the website remains accessible even if one server fails, from any part of the world.
Finally, the IP address is fetched, and the website content is displayed on your screen.
Wrap up
We get an IP by querying the DNS resolver, which follows a hierarchical process through the Root Server TLD and authoritative servers to return the correct IP address for the domain.
Thankyou!!