1 Tutorial
Updated 02/08/17

DNS

DNS stands for Domain Name System. The DNS system was invented by Paul Mockapetris in 1983. Before the DNS system was invented, there was a single file called hosts.txt in every computer which needed to be updated manually every time there was a change in the computer network called ARPANET at the time.

What does DNS do?

In the simplest form, DNS translates domain names e.g. itutorials.net to IP addresses e.g. 192.168.1.1 But as you will see after you finish reading this tutorial, DNS does much more than just name translation.

How does DNS work?

DNS is a complex system, but the fundamental point to understand about DNS is that it is a hierarchical system:

DNS network

At the top of the DNS hierarchy sit the the Root DNS servers. The root DNS servers house the top domain names e.g. .com, net, .org, etc. Below the top root servers are the domain name servers from registrars like GoDaddy. Registrars are authorized identities that can create second level domains like Google.com and ittutorials.net. Every time someone buys a new domain name through GoDaddy, GoDaddy sends that request to the root servers for registration. GoDaddy pays ICANN the keeper of the root servers about 18 cents per each domain they register. GoDaddy charges about $13 per domain registration, so they make a good profit every time someone register a domain through them. There are many other DNS servers under the DNS hierarchy.

Domain URL

If you work in a big organization, most likely they have an internal DNS server too. All these DNS servers keep a copy of all the the root DNS server databases, and update it periodically, if a query is performed about a domain that they don’t know, they forward that request to the root servers and update their records accordingly. Also, all computers keep a record of domain names people type on their browsers too. for example, you visited this site ittutorials.net today, if you visit this site later on or even tomorrow, the computer does not query a DNS server to find the IP Address of this site anymore, it uses the record stored locally to find the website quickly.

Its interesting, but all operating systems still ship the original hosts.txt file people used before the DNS system was invented. it comes handy when troubleshooting DNS problems sometimes.

What is reverse DNS?

Reverse DNS is the process of translating an IP address to a domain name. you can run a reverse DNS query using the nslookup command in all operating systems.

Common records associated with a domain name

  • A the A stands for Address in DNS, and is used to associate a domain name with an IP Address.
  • CNAME stands for “Canonical Name” CNAMES are use to “alias” one domain to another. for example, if I own the ittutorials.net and ittutorials.org domains, I can create a CNAME in ittutorials.org to forward that domain to ittutorials.net. Many people use a CNAME record to forward the prefix “www” to the domain as well.
  • MX stands for Mail exchanger (MX) and it provides message routing to a specified mail exchange host ( a mail server ) that is acting as a mail exchanger for a specified DNS domain name.
  • TEXT (TX) Text (TXT) record. this record  holds a string of characters that serves as descriptive text to be associated with a specific DNS domain name.

Troubleshooting DNS commands

  • ipconfig /flushdns This command flushes the DNS records cached in Windows system
  • service nscd restart Flushes the DNS records cached in Ubuntu
  • nslookup you can use the nslookup in most operating systems to get the records of any domain name.

Conclusion

I hope this quick overview of the DNS system was helpful for you to understand what DNS is, and what it does. If you have any question, suggestion or comment,  please use the comment box below.

URL Canonicalization

URL Canonicalization

This post idea came up from an IT support request I got from a user trying to get to our company website today. she was typing just the the domain name without using the www prefix on the browser, and she was getting to our domain controller web server instead of the public site, and she was wondering why. she…