{ > > }

DNS - The Internet's Phonebook

Mohammad AM

Dec 7, 2024

Confused About How Websites Actually Work? The Pieces to the Puzzle

Can you imagine having to remember a series of numbers like 142.250.190.14 (Google’s IP address) every time you want to visit a website? What a nightmare! That’s where DNS comes to the rescue. It is a web framework that translates those complex IP addresses into the easy-to-remember domain names we use every day.
Navigating to a website through it's IP Address

Navigating to a website through it's IP Address

Let’s demystify DNS to learn how it works!

DNS: The Internet’s Phonebook

What is DNS?

Imagine you want to call a friend. Do you memorize their phone number? Probably not! You can look them up in your phone’s contact list by their name.

DNS works in a similar way. It’s essentially the internet’s phonebook. Let’s look at some of it’s fundamental concepts, the Domain Name, and the IP Address:

Domain Name: An example of a domain name would be google.com. Similar to your friend’s name in your contact list, this is a human-readable address that you would type into your browser.

IP Address: Our example above uses the IP address for Google: 142.250.190.14. This is like your friend’s actual phone number. It is the address of the server hosting the website.

DNS translates the domain name you type in your address bar to the IP address that computers use to locate the website. Saving you from having to memorize the numerical address.

The DNS Lookup Process: A Step-by-Step Guide

Let’s walk through what happens behind the scenes when you type a domain name into your browser:

1. User Types Domain Name: You type the domain name yourdomain.com into your browser’s address bar and press Enter. Your browser will then initiate a request to find the IP address associated with that domain name.

2. Recursive Resolver: Your computer sends this request to a DNS server called a recursive resolver. It is usually provided by your Internet Service Provider (ISP). Think of it as your personal research assistant. It doesn’t necessarily know the answer, but it knows who to ask.

3. Root Servers: The resolver first contacts one of the internet’s root servers. These servers act as the top-level authority and direct the resolver to the appropriate Top-Level Domain (TLD) server.

4. Top-Level Domain (TLD) Servers: The TLD server is responsible for domains like .com, .org, .net, etc. In our example, the root server would direct the resolver to the .com TLD server. The .com TLD server knows which server is responsible for all .com domains.

5. Authoritative Name Servers: Finally, the TLD server directs the resolver to the authoritative name server for yourdomain.com. This is the server that holds the actual DNS records for your domain. It’s the ultimate source of truth!

6. IP Address Returned: The authoritative name server provides the IP address associated with yourdomain.com back to the resolver. The resolver then passes this IP address to your browser. Your browser can now use this IP address to connect to the server hosting the website and display the page!

High level view of domain name resolution

High level view of domain name resolution

DNS Propagation

After you make changes to your DNS records, it’s important to understand that these changes don’t take effect instantly. This is due to something called DNS propagation.

DNS resolvers cache DNS records to speed up future lookups. When you update a DNS record, it takes time for these caches to be updated across the internet.

Factors Affecting Propagation Time

TTL - Time To Live: This value in a DNS record determines how long a resolver is allowed to cache that record. A lower TTL means changes will propagate faster, but can also increase the load on your name servers. A higher TTL means changes will take longer to propagate, but reduces the load on your name servers.

Tools to Check DNS Propagation

Fortunately, you can use online tools like whatsmydns.net to check the status of your DNS propagation and see how the changes are being reflected in different parts of the world.

Screenshot of 'whatsmydns.net'

Screenshot of 'whatsmydns.net'

In Conclusion

DNS plays a crucial role in the way we experience the internet. Creating a vital link between human-readable domain names and the IP addresses that computers use to communicate. Therefore, understanding the basics of DNS, the lookup process, and the key record types is crucial for anyone managing a website or online presence.

Check out the next installment in this series, where we’ll explore another the essential pieces of the website puzzle!