Behind the Scenes of the Internet: Your Friendly Guide to DNS Records
Discovering How Browsers Locate Websites

When you type amazon.com or google.com into the search bar and hit enter, it might seem like magic, but there's actually a lot happening behind the scenes.
The Internet’s Phonebook
Computer doesn't understand the domin name of sites instead it uses IP Addresses (which look like 172.217.14.78) to communicate. Every server has a unique IP Address. For humans it becomes difficult to memorize long strings so instead of remembering these IP Addresses we use DNS.
DNS (Domain Name System)
DNS is the bridge between humans and computers. It is called the phonebook of the internet. When you type a domain name in your browser your computer calls up the DNS phonebook and ask it about the IP address for that domain name. DNS looks it up then provide the IP address to connect your computer.
Why We Need Records
If DNS is a phonebook then a DNS Record is a single entry in that book. A domain name doesn’t only display a website. You might want to receive emails at that domian. Because a domain has different jobs so the phonebook needs different types of entries. You can not use an email record to load a website and you can not use a mailing address to make a phone call.
The “Manager” NS Record (Name Server)
Before finding the website we need to know the owner of the information.
The Problem: Who holds the master phonebook for this specific domain?
The Analogy: The Librarian.
The NS record doesn’t tell you where the website is. It only tell the internet which company manages your DNS settings. The registrar (like GoDaddy) sets themeselves as the manager whenever you buy a domain. Whenever you change NS records it means you are telling the internet that I have hired a new librarian go and ask them for my information.

The “Street Address” A Record
This is known as the most important record for getting a website to load.
The Problem: Where is the server hosting this website located (using the standsard internet language)?
The Analogy: Your house street address (e.g 123 Main Street).
The “A” stands for Address. It maps your domain name directly to an IPv4 Address (the standard numbers and dots addresses). To display your site to users you need an A record.

The “Modern GPS” AAAA Record
The Problem: The Internet is running out of standard addresses how do we use the newer system?
The Analogy: A highly precise, modern GPS coordinate.
The internet is upgrading to IPv6 which user much longer and complex address. The “AAAA” record maps the domain name to this modern IPv6 address. Nowadays many sites use these both A and AAAA records to make sure everyone can access the site.
The “Nickname” CNAME Record
The Problem: I want one name to just point to another name not a specific number.
The Analogy: A forwarding address, or a contact in your phone that just says “Hey dear.”
CNAME stands for “Cononical Name.” It creates an alias.
A common use is for the “www” version of your site. You often set up a CNAME for www.yourdomain.com that just points to your.domain.com. It tells the browser whatever the main domain does the “www” version should copy that.
Common Confusion: A vs. CNAME
An A Record connects a name to a phone number (IP Address). A CNAME Record connects a name to another name.

The “Post Office” MX Record
The Problem: If someone sends an email to @yourdomain.com, where it should be delivered?
The Analogy: The local post office branch that handles your mail.
MX stands for “mail Mail Exchange” record is a DNS entry that tells the internet which mail server is responsible for receiving email on behalf of your domain. Your website might live on a single server but your email might be handled by a different company (like Google Workspace or Microsoft 365).
Confusion Between NS vs MX Records
NS records manage your entire domain’s DNS settings and MX records only handle email routing.

The “Sticky Note” TXT Record
The Problem: I need to store some text information to prove ownership or secure my email.
The Analogy: A sticky note on a file containing extra details.
The DNS text (TXT) record lets a domain owner to enter text into the DNS and it stores the text in the form of strings. A single domain cah have many TXT records. It helps to authenticate weather a message is from a trusted source or not.
How do these work for a single website? Let’s imagine Asim’s site
Asim buys the domain balochcoder.com. Here is what his DNS setup might look like":
Ns Records: Point to her registrar, who manages the list.
A Record: Points balochcoder.com to the IP address of the server hosting his website pictures.
CNAME Record: Points www.balochcoder.com to balochcoder.com so both work perfectly.
MX Records: Point to Google's mail servers, so he receives email at subscriber@balochcoder.com.
TXT Record: A verification code he added to prove to Instagram that the website belongs to him.
All these records live peacefully side-by-side in the internet's phonebook to ensure that Asim’s site work properly.




