Beginner's Guide to DNS and DNS Record Type

Learning web development in public. Writing simple, real-world explanations about web development concepts. Helping beginners understand why things work, not just how.
Search for a command to run...

Learning web development in public. Writing simple, real-world explanations about web development concepts. Helping beginners understand why things work, not just how.
No comments yet. Be the first to comment.
Every day, millions of users upload photos, videos, stories, and reels to Instagram. From a user's perspective, the process appears simple: select media, apply filters, add a caption, and tap "Post."
Building Offline-First Messaging Apps: How Messages Work Without Internet Modern messaging applications have transformed the way people communicate. Whether it's chatting with friends, collaborating w
In this article we'll explore about the Expo Router and React Navigation and answer which one to use in 2026. If you build mobile apps using React Native, one thing becomes obvious very quickly: Navig

Modern mobile apps are no longer just a collection of screens connected together. Apps like Instagram, WhatsApp, Uber, and Netflix operate at massive scale with millions of users, real time systems, o
In this article we'll be exploring react.js and the things of react.js that makes it popular and stand out among other libraries ( no fight over library vs framework ). We'll go through: What problem

Shkaai
68 posts
In this article I’ll walk you through what is DNS (Domain Name System) , why computer system needs it all and what are the DNS record types in details.
Let’s understand DNS in very simple way. There are hardly any people who remember their friends phone numbers, they mostly just save their names against respective numbers. so, whenever someone needs to call a friend, they search their names and simply call them. DNS works in the same way, it saves numbers (like: 142.250.183.206 ) against respective websites name. This system is needed because of the difference between the capabilities of humans and computers. Computers are good with numbers, whereas humans are good with names.
In short, DNS (Domain Name System) translates human-friendly websites name into computer friendly IP address.
Finding a same pair of socks in the entire house takes effort, now imagine how DNS looks for a particular website through it’s numeric address (IP) among billions of websites.
Let’s assume you are searching google.com but internet does not understand this language, it needs IP address. This problem is solved by DNS and then the resolver comes to play it’s role only when browser couldn’t find the website in cache. Resolver asks a chain of servers:
Root server: This server helps to find the correct top level domain such as .com, .org, .in etc.
TLD server: It points to Authoritative nameserver for that specific domain. (who knows google.com)
Authoritative Server: Provides exact IP address.
Once the browser has the IP address, it connects to exact website.
What is DNS record ?
Just as we understood the DNS through phone contacts example, let’s understand DNS record with the same example. In phones contact we save number in these formats:
Name: Shweta
Phone: +91xxxx
Email: shweta@email.com
DNS records the info in similar formats like:
Domain: example.com
IP address: 93.184.216.34
Mail server: mail.example.com
These pieces of information is a DNS record.
Why do we need these records?
All these records are needed to answer questions like, is this domain safe ? is there backup server ? where is website hosted ? where should emails go ? etc. DNS records give clear instructions to all these questions.
Without them, website won’t load, email won’t arrive and services won’t work. That is how powerful DNS and DNS records are.
NS record basically answer question to “Which DNS server to trust for this domain ?”. Internet is full of trillions of data about billions of things, so asking this question to everything is overkill. Therefore NS records makes it super easy to ask right question from right place. It directs DNS queries to correct location for domain resolution.
example.com → ns1.dnsprovider.com
NS records don’t tell where a website is — they tell who is allowed to answer that question.
A Record resolve the question of “Where is the website (IPv4)?”. Computers don’t understand domain name, they understand the IP addresses. And A Record solves this problem. When example.com is asked A record answer example.com → 93.184.216.34.
Without A Records websites won’t load though domain would exists but it wouldn’t know where to go.
It does same thing as A Record but for IPv6. IPv4 is limited and internet needed more addresses. So, same job as A record - just modern addressing.
example.com → 2606:2800:220:1:248:1893:25c8:1946
Without AAAA record ipv6-only networks won’t reach websites.
CNAME records solves the problem of duplicating IP addresses for different aliases of the same website.
www.example.com → example.com -> blog.example.com
Without CNAME manual updates would be needed which can break things.
MX records handle how emails find the intended mail servers. Emails and websites, more than often are handled separately. Your website may be on AWS while email on Gmail.
example.com → mail.google.com
Without MX record emails would bounce off and would not reach the intended mail servers, domains would not receive emails.
TXT record basically handle proof, trust, and extra info. It solves the problem of “How can a domain prove who it is and what it allows?”. TXT records store free-form text. Used for:
Domain ownership verification
Email security (SPF, DKIM, DMARC)
Security policies
Without TXT records emails can be spoofed and services can’t verify domain ownership, creating quite a big problem.
DNS records are instructions that tell the internet who controls a domain, where its services live, and how to trust it.
Each record exists because the internet needed a clear answer to a specific problem. Without DNS record, security can be compromised easily on internet. Therefore DNS plays very significant role in internet system, providing human and computer friendly safety and seamless interaction.