When a user enters a domain name into a browser or sends an email to another person, the internet needs a way to know exactly where to go. This process is not random — it follows a precise global system.
That system is DNS (Domain Name System). In this article, we will go in-depth on how it technically work.
In this guide, you’ll understand:
- Why DNS and Nameservers Exist At All
- How the DNS System Works?
- What are the layers in the DNS System and why they exist?
- How your browser actually finds your website going through these layers?
- How your email gets delivered going through these layers?
Let’s break it down properly.
Why DNS and Nameservers Exist At All
A domain name (example.com) cannot load anything on its own.
Your browser and email client only understand IP addresses and 1 example of how a IP address look like is:
203.0.113.55
DNS exists to:
Convert domain names → IP addresses
Tell browsers where the website is hosted
Tell mail servers where email should be delivered
Nameservers exist to:
Store DNS records
Provide the official answers for your domain
Tell the internet: “These are the instructions for this domain.”
Without DNS and nameservers, a domain name is just text — it cannot reach a website or receive email.
If you already know how DNS works, and you wish to jump right in to know how to point your domain name to your website or email services instead, you can skip this guide.
How the DNS System Works (Fully Connected & Explained)
The DNS system works like a hierarchy. There are layers in each hierarchy, that is responsible to connect the domain and the hosting.
Each layer has a duty, and each one passes the request to the next. And we will go ahead to explain the layers which will allow you to understand how the DNS system works in and out.
What are the layers in the DNS System and why they exist?

When someone types a domain name into their browser, the internet follows a fixed, step-by-step path to locate the correct server for the website or email.
This journey always begins at the browser and ends at the your server.
- Browser
- Root Nameservers
- TLD Nameservers
- Authoritative Nameservers
- DNS Records
- Your Server
Now we go further into each layer to explain each of their roles:
Layer 1: Browser (Where the DNS Lookup Starts)
When a user enters a domain (e.g., www.example.com) into the browser and hits Enter, the browser needs to convert that domain name into an IP address.
The browser first checks its local DNS cache. If the IP is not cached, it begins a fresh DNS lookup by asking the DNS hierarchy:
“Where can I find the server for this domain?”
The browser (via your device’s DNS resolver) now sends the query to the internet’s master directory:
➡️ Layer 2: Root Nameservers
Layer 2: Root Nameservers (The Internet’s Global Index of All TLDs)
Root Nameservers sit at the top of the DNS system.
They do not know your domain’s IP address, email server, or DNS settings.
They only know which Top-Level Domain (TLD) server handles which extension:
- .com
- .sg
- .net
- .org
- .io
- .xyz
So when the browser asks:
“Where do I find information about example.com?”
The Root Nameserver replies:
“Go to the .com TLD Nameserver.”
There are only 13 root server clusters, but each is replicated worldwide thousands of times for speed and redundancy.
➡️ Root → directs the query to the correct TLD Nameserver.
Layer 3: TLD Nameservers (Control the Domain Ending: .com / .sg / .net)
Once the Root points the browser to the correct TLD, the browser asks:
“Which nameservers are responsible for example.com?”
TLD Nameservers store the nameserver information for each domain under their extension.
For example, the .com TLD Nameserver might return:
example.com uses:
ns1.qoxy.com
ns2.qoxy.com
Important:
TLD Nameservers do not store DNS records like IP addresses or MX settings.
They only store the location of the domain’s Authoritative Nameservers.
➡️ TLD → tells the browser which Authoritative Nameserver to contact next.
Layer 4: Authoritative Nameservers (The Final Source of Truth)
Now the browser knows where your domain’s real DNS information lives.
If your domain uses Qoxy nameservers:
- ns1.qoxy.com
- ns2.qoxy.com
These servers hold your domain’s DNS zone file, which contains all the records that control your website and email.
This layer has the ability to give the complete, final answer.
The browser will now ask:
“Please give me the DNS records for example.com.”
➡️ Authoritative Nameservers → Provide the actual DNS records stored for your domain.
Layer 5 — Authoritative Nameservers + DNS Records
This is your DNS zone — stored on your hosting provider, Cloudflare, or DNS manager.
This layer contains:
-
A records
-
CNAME records
-
MX records
-
TXT records
-
SPF, DKIM, DMARC
-
AAAA, NS, SRV, etc.
Your authoritative nameserver provides the final answer back to the resolver:
-
“Website IP is 203.0.113.10”
-
“Email should be delivered to mail.protection.outlook.com”
-
“www is a CNAME to example.com”
This layer is the source of truth.
✅ Layer 6 — The Web / Email Server Responds (Final Execution Layer)
Once DNS records are returned, the browser or mail server now knows exactly where to go.
Website Scenario
- DNS tells the browser:
example.com → 203.0.113.10 - The browser directly connects to the server at that IP.
- The server receives the request and serves the website files.
- User sees the website.
Email Scenario
- DNS MX record tells mail servers:
example.com → mydomain-com.mail.protection.outlook.com - Sending mail server connects to Microsoft 365’s mail server.
- Microsoft 365 receives the email.
- The email is stored and delivered to your mailbox.
Other Scenarios
- SPF tells receiving servers whether the sending server is allowed
- DKIM verifies whether the email is authentic
- TXT records complete third-party verifications
- AAAA points to IPv6 servers
- CNAME builds aliases that redirect to other hostnames
In short:
Layer 6 is where the actual communication happens — the website loads or the email is delivered.
DNS only tells the systems where to go; Layer 6 is the moment the server responds.
Let’s break down a few situations so you can see how DNS applies in real life. Eg. Opening a website or someone sends you an email.
How your browser actually finds your website?
When you enter a domain into your browser, it must figure out where the website is hosted.
Here’s the simplified sequence:
- Your browser checks which nameservers your domain is using
Example: ns1.qoxy.com, ns2.qoxy.com - Your nameservers store your DNS zone
- Your browser looks for the A Record, which contains your server’s IP
- It connects to that IP
- Your website loads
You type a friendly domain name — but DNS does the real work of locating the correct server.
How your email gets delivered?
Email delivery works the same way, but instead of a website server, it must find your mail server.
- Someone sends an email to [email protected]
- Their mail server checks your domain’s nameservers
- It loads your MX Record to find your mail server
- It connects to that mail server and hands over the message
- SPF, DKIM, and DMARC (TXT records) help authenticate the email
Without DNS records, your email provider would not know where to receive your mail.
Conclusion
DNS and nameservers work together to ensure the Internet knows where your website and email services are located. Nameservers provide the home for your DNS zone, and DNS records provide the instructions that direct traffic correctly.
With this guide, you now understand how your domain can reach your website, how your email gets delivered, and how everything comes together behind the scenes. This knowledge helps you manage your domain confidently across any situation — whether you’re launching a website, setting up email, or switching hosting providers.