DNS (Domain Name System) — this is essentially the phone book of the Internet.
Imagine: you want to call a friend. You look up their name in your contacts (“Vitaliy”), hit call, and the phone connects you via number (e.g., +43 664...). You don’t need to remember the number itself, only the name.
It’s the same with the internet. Computers communicate with each other using numbers — IP addresses (e.g., 142.250.185.206). People find it easier to remember words (e.g., google.com). DNS is the system that translates human words into machine numbers.
🕵️♂️ How It Works: Step-by-Step Investigation
When you type a website address in your browser, real detective work happens in milliseconds. Here are the stages of this “quest”:
- Request (The Ask): You type
wikipedia.org. Your computer first checks its memory (cache): “Have I been here recently? Do I know this IP?” - Recursive Resolver (The Librarian): If the computer doesn’t know, it asks your internet service provider (ISP). There is a special resolver server there that takes on the task of finding the answer.
- Root Server (The Root): The resolver doesn’t know the exact address, but knows where the “main” servers (Root Servers) are. It goes there. The root server says: “I don’t know the exact IP, but I know who’s responsible for all sites ending in .org. Go to the TLD server.”
- TLD Server (Top Level Domain): The resolver goes to the
.orgzone server. That one responds: “Ah,wikipedia.org? I know them. Their personal address list is on the authoritative server at this address.” - Authoritative Server (The Boss): This is the final point. The resolver knocks there and asks: “What’s the IP of
wikipedia.org?”. The server responds: “Here you go:91.198.174.192.” - Delivery: The resolver gives the IP to your browser, the browser loads the page, and the IP is saved in cache so the entire chain doesn’t need to be walked through next time.
🗃️ DNS Record Types (What’s Inside the Book)
In this “phone book” there are different record types for different needs. Here are the main ones worth knowing:
| Record Type | Full Name | What it does? |
|---|---|---|
| A | Address | The most important. Links a domain to an IPv4 address (e.g., 1.1.1.1). |
| AAAA | Address (IPv6) | Same thing, but for new, long IPv6 addresses. |
| CNAME | Canonical Name | Alias. Redirects one domain to another (e.g., www.site.com → site.com). |
| MX | Mail Exchange | Specifies where to send email for this domain. Without it, email doesn’t work. |
| TXT | Text | Text information. Often used to verify domain ownership or protect against spam. |
💡 Why Does This Matter?
Without DNS, the internet as we know it would collapse.
- Convenience: We don’t need to memorize sets of numbers.
- Flexibility: The website owner can change the server (and IP address), but the domain name remains the same. Users won’t even notice the move.
- Speed: Thanks to DNS caching (saving responses), websites open instantly.
Interesting fact: There are only 13 root servers in the world (logically), labeled with letters from A to M. But physically there are hundreds of servers around the world using Anycast technology for reliability.