π§ First: Big Picture
DNS is basically a huge phonebook:
π βHuman-readable nameβ β βIP addressβ
Example:
quizmaker.co.in β 104.18.2.119
But instead of just one mapping, DNS stores different types of records (RRs) for different purposes.
π§© Key Terms (Super Important)
1. π Domain Name
A domain name is the main name registered on the internet.
π Example:
quizmaker.co.in
- Think of it as your brand / root identity
- Managed at domain level
2. π Hostname
A hostname is a specific machine/service under a domain.
π Examples:
www.quizmaker.co.in
api.quizmaker.co.in
relay1.main.quizmaker.co.in
π Structure:
[hostname].[domain]
So:
-
quizmaker.co.inβ domain -
relay1.main.quizmaker.co.inβ hostname (specific server/service)
3. π― IP Address
The actual address of a machine on the internet
π Example:
104.18.2.119
- Computers talk using IPs, not names
4. π Canonical Name
βCanonicalβ = real/original name
A canonical name is the true hostname of a server.
π Used in CNAME records
Example:
relay1.main.quizmaker.co.in β server1.primary.quizmaker.co.in
Here:
-
relay1.main.quizmaker.co.in= alias -
server1.primary.quizmaker.co.in= canonical (real) name
π Now Letβs Understand Each Record Type
π °οΈ A Record (Most Important)
π Maps hostname β IP address
(A, relay1.main.quizmaker.co.in, 104.18.2.119)
Meaning:
- Hostname:
relay1.main.quizmaker.co.in - IP:
104.18.2.119
π This is what ultimately lets your browser connect
π‘ NS Record (Name Server)
π Tells: βWho is responsible for this domain?β
Maps domain name β hostname
(NS, quizmaker.co.in, relay1.main.quizmaker.co.in)
Meaning:
- Domain:
quizmaker.co.in - Hostname:
relay1.main.quizmaker.co.in
π Used during DNS lookup process
π CNAME Record (Alias)
π Maps alias hostname β real (canonical) name
(CNAME, relay1.main.quizmaker.co.in, server1.primary.quizmaker.co.in)
Meaning:
- Alias:
relay1.main.quizmaker.co.in - Real server:
server1.primary.quizmaker.co.in
π Then DNS will do:
relay1.main.quizmaker.co.in β 104.18.2.119 (via A record)
server1.primary.quizmaker.co.in β 104.18.2.119 (via A record)
So CNAME = indirection layer
π§ MX Record (Mail Server)
π Tells where emails should go
(MX, mail.quizmaker.co.in, mailserver1.backup.quizmaker.co.in)
Meaning:
- Email domain:
mail.quizmaker.co.in - Mail server:
mailserver1.backup.quizmaker.co.in
π Used by email systems (SMTP)
βοΈ Differences (Crystal Clear)
| Concept | Meaning | Example |
|---|---|---|
| Domain Name | Root identity | quizmaker.co.in |
| Hostname | Specific service | relay1.main.quizmaker.co.in |
| Canonical Name | Real/original hostname | server1.primary.quizmaker.co.in |
| IP Address | Machine address | 104.18.2.119 |
π End-to-End Example (Putting It All Together)
Letβs say you type:
https://quizmaker.co.in
DNS might do:
CNAME:
quizmaker.co.in β server1.primary.quizmaker.co.in
A record:
server1.primary.quizmaker.co.in β 104.18.2.119
Browser connects to:
104.18.2.119
π§ Intuition (Real-world analogy)
Think of it like this:
- Domain name = Company name
- Hostname = Specific office
- Canonical name = Official registered office
- IP address = GPS coordinates
CNAME is like:
π βThis office is actually handled by another main officeβ
β‘ Key Takeaways
- Domain = top-level identity
- Hostname = specific service under domain
- Canonical name = actual server name (used in CNAME)
- IP address = real machine location
- A record = final step (name β IP)
- CNAME = alias layer (name β name β IP)
π Want a better reading experience?
π Visit the full blog here: https://quizmaker.co.in/creators/@swati_goyal_911/blog/from-domain-to-ip-demystifying-dns-records-in-minutes
Top comments (0)