DNS: A Beginner's Guide to Domain Name Systems

DNS: A Beginner's Guide to Domain Name Systems

Introduction

What is a DNS server?

A DNS server is like the internet's phonebook. When you type a website address into your browser, like www.google.com, your computer doesn't know how to find that website directly. Instead, it needs to look up the website's IP address (a unique set of numbers that identifies the website's location on the internet) from a DNS server.

Why is DNS important?

Here's an illustration:

Imagine you're a pirate and you've just discovered a treasure map with the location of your buried treasure. But to find the treasure, you need to use a compass to point you in the right direction. A DNS server is like your compass, and your domain name is like the treasure map. By pointing your domain name to a DNS server, you'll be able to find your treasure (your website) on the internet!

DNS is important because it makes the internet easier to use. Imagine if you had to remember a bunch of IP addresses to visit your favourite websites instead of just typing in the domain name. It would be like trying to remember a bunch of phone numbers instead of just the names of your contacts. DNS makes it possible to use domain names instead of IP addresses, which is much easier and more intuitive.

How does DNS work?

Here's an illustration of how DNS works:

Imagine you're trying to call your friend Sarah, but you don't know her phone number. You call your friend John, who might know Sarah's number. If John doesn't know the number, he calls his friend Jane, who might know. This process continues until someone finally knows Sarah's number and tells you. Then you can call Sarah and have a chat!

Simple step-by-step explanation:

  1. You type a website address into your browser, like www.google.com.

  2. Your computer sends a request to a DNS server asking for the IP address associated with that domain name.

  3. The DNS server checks its records to see if it already knows the IP address. If it does, it sends the IP address back to your computer.

  4. If the DNS server doesn't already know the IP address, it sends a request to another DNS server that might know the answer. This process continues until the IP address is found and sent back to your computer.

  5. Your computer now has the IP address it needs to connect to the website, and it sends a request to that IP address asking for the website's content.

  6. The website sends its content back to your computer, and you can see the website in your browser.

Figure 1. How DNS server works:

Image Representation

Pointing a host to a DNS server

When you want to create a website, you need to make sure that it has a unique address that people can use to find it on the internet. This address is called a domain name, and it's like a signpost that tells people where your website is located.

However, for your domain name to work properly, you need to "point" it to a DNS (Domain Name System) server. Remember, a DNS server is like a giant phone book that keeps track of all the domain names and their corresponding IP addresses on the internet.

Here's a simple guide to doing that:

  1. Choose a domain name - Before you can point your host to a DNS server, you need to choose a domain name that you want to use for your website. This can be anything you like, as long as it's not already taken.

  2. Buy your domain name - Once you've chosen your domain name, you need to buy it from a domain registrar. This is like registering your business name but for the internet. There are many domain registrars to choose from, like GoDaddy, Namecheap, and Domain.com.

  3. Log in to your domain registrar account - After you've bought your domain name, you'll need to log in to your domain registrar account to make some changes.

  4. Find your DNS settings - Look for the DNS settings or DNS management section in your domain registrar account. This is where you'll be able to point your host to a DNS server.

  5. Enter your DNS server information - Your web hosting provider should provide you with the IP addresses of their DNS servers. Enter these IP addresses in the appropriate fields in your DNS settings.

  6. Save your changes - Once you've entered your DNS server information, save your changes. It can take up to 48 hours for these changes to propagate across the internet, so be patient!

  7. Test your domain name - After 48 hours, you should be able to test your domain name to make sure it's pointing to the correct DNS server. Simply type your domain name into your web browser and see if it takes you to your website.

DNS records and types

DNS records are like the crew of a ship – each one has a specific job to do to keep the ship running smoothly on the high seas of the internet.

Here are the most common types of DNS records and what they do:

  1. A (Address) record – This record links a domain name to an IP address. It's like a map that tells your browser where to find the website you're looking for.

  2. MX (Mail Exchange) record – This record tells email servers where to deliver emails for a specific domain. It's like a postal address for your email.

  3. CNAME (Canonical Name) record – This record creates an alias for a domain name. It's like having a nickname that people can use to find your website.

  4. NS (Name Server) record – This record tells the internet which name servers are authoritative for a particular domain. It's like a signpost that points to the right DNS server.

  5. TXT (Text) record – This record allows you to add extra information to a domain name. It's like leaving a note for someone to find.

  6. SRV (Service) record – This record is used to specify a server and port for a particular service. It's like having a phone book that tells you which number to call for a specific service.

DNS propagation

This is the process by which DNS changes are spread across the high seas of the internet. It's like sending a message in a bottle and waiting for it to reach its destination!

When ye make changes to your DNS settings, like pointing your domain to a new server or updating your DNS records, those changes need to be spread across all the DNS servers in the world. This is called DNS propagation, and it can take some time for the changes to be fully implemented.

Think of it like a game of telephone – you whisper a message to one person, who whispers it to the next person, and so on. Eventually, the message reaches its destination, but it may be slightly different from the original message.

In the case of DNS propagation, the changes you make to your DNS settings need to be whispered to all the DNS servers in the world. Each server then whispers the changes to the next server, until eventually, all the servers have received the changes and your website is pointing to the right place.

This process can take anywhere from a few minutes to 48 hours, depending on how quickly the changes are propagated across the internet.

Figure 2. How DNS propagation works:

Conclusion

DNS – the Domain Name System that keeps the high seas of the internet running smoothly.

DNS is like the compass that helps ye navigate the internet, guiding you to the websites and online services you seek. And just like a ship needs a good crew to keep it afloat, DNS relies on various records and settings to do its job.

From 'A records to NS records, and DNS propagation' to pointing hosts to DNS servers.