How Domain Name System (DNS) Works

In the world of Internet and the area of computer networks, you will often come across the term Domain Name System or Domain Name Service which is simply referred to as DNS. The working of DNS forms one of the basic concepts of computer networks whose understanding is very much essential especially if you are planning to get into the field of ethical hacking or network security.

In this post, I will try to explain how Domain Name System works in a very simple and easy to follow manner so that even the readers who do not have any prior knowledge of computer networks should be able to understand the concept.

What is a Domain Name System?

A “Domain Name System” or “Domain Name Service” is a computer network protocol whose job is to map a user friendly domain name such as “” to its corresponding IP address like “”.

How Domain Name System (DNS) Works

Every computer on the Internet, be it a web server, home computer or any other network device has a unique IP address allotted to it. This IP address is used to establish connections between the server and the client in order to initiate the transfer of data. Whether you are trying to access a website or sending an email, the DNS plays a very important role here.

For example, when you type “” on your browser’s address bar, your computer will make use of the DNS server to fetch the IP address of Google’s server that is “”. After obtaining the IP address, your computer will then establish a connection with the server only after which you see the Google’s home page loading on your browser. The whole process is called DNS Resolution.

With millions of websites on the Internet, it is impossible for people to remember the IP address of every website in order to access it. Therefore, the concept of domain name was introduced so that every website can be identified by its unique name which makes it easy for people to remember. However, the IP address is still used as the base for internal communication by network devices. This is where the DNS comes in to action that works by resolving the user friendly domain name to its corresponding machine friendly IP address.

In simple words, domain names are for humans while IP addresses are for network devices. The “Domain Name System” is a protocol to establish a link between the two. Hence, it is not a surprise that you can even load a website by directly typing its IP address instead of the domain name in the browser’s address bar (give it a try)!

Types of DNS Servers and their Role:

The Domain Name System (DNS) is a distributed database that resides on multiple computers on the Internet in a hierarchical manner. They include the following types:

Root Name Servers:

The root servers represent the top level of the DNS hierarchy. These are the DNS servers that contain the complete database of domain names and their corresponding IP addresses. Currently, there are 13 root servers distributed globally which are named using the letters A,B,C and so on up to M.

Local Name Servers:

Local servers represent the most lower level DNS servers that are owned and maintained by many business organizations and Internet Service providers (ISPs). These local servers are able to resolve frequently used domain names into their corresponding IP addresses by caching the recent information. This cache is updated and refreshed on a regular basis.

How DNS Server Works?

Whenever you type a URL such as “” on your browser’s address bar, your computer will send a request to the local name server to resolve the domain name into its corresponding IP address. This request is often referred to as a DNS query. The local name server will receive the query to find out whether it contains the matching name and IP address in its database. If found, the corresponding IP address (response) is returned. If not, the query is automatically passed on to another server that is in the next higher level of DNS hierarchy. This process continues until the query reaches the server that contains the matching name and IP address. The IP address (response) then flows back the chain in the reverse order to your computer.

In rare cases where none of the lower level DNS servers contain the record for a given domain name, the DNS query eventually reaches one of the root name server to obtain the response.

FAQs about Domain Name System:

Here is a list of some of the FAQs about DNS:

How does a “root name server” obtain the information about new domains?

Whenever a new domain name is created or an existing one is updated, it is the responsibility of the domain registrar to publish the details and register it with the root name server. Only after this, the information can move down the DNS hierarchy and get updated on the lower level DNS servers.

What is DNS propagation?

Whenever a new domain name is registered or an existing one is updated, the information about the domain must get updated on all the major DNS servers so that the domain can be reached from all parts of the globe. This is called DNS propagation and the whole process can take anywhere from 24 to 72 hours to get completed.

How often the DNS servers are updated to refresh the cache?

There is no specific rule that defines the rate at which DNS servers should be updated. It usually depends on the organization such as the ISP that maintains the server. Most DNS servers are updated on an hourly basis while some may update their databases on a daily basis.

I hope you have now understood the working of DNS in a very convincing manner. Pass your comments and share your opinion.


  1. Sijo Joy
    December 7, 2012 at 10:15 AM

    Gud Work Srikanth. keep it up. u r my inspiration for creating blogs. Ur all posts give new idea for me. Thank u so much

    • Srikanth
      December 7, 2012 at 10:41 AM

      Thanks a lot for your valuable feedback :)

    • narender malik
      January 24, 2013 at 9:52 PM

      shrikant brother how i can get more knowledge about hacking . i want to become hacker.

  2. Praveen Singh
    December 11, 2012 at 8:28 PM

    I was a regular visitor of your site,I thought you had stop posting.But whenever you post , it is the best.

  3. shubham agarwal
    December 14, 2012 at 8:34 PM

    great post..!!! i was not having any idea of DNS..
    but after reading ur post.!!
    i now have a good idea…
    great work keep it up man….!!

  4. Mark
    December 15, 2012 at 4:52 AM

    Can you post more regularly please? I’d love to chat with you so we can do some business together and hopefully learn from you.

  5. manar
    December 24, 2012 at 1:41 PM

    you’re great engineer i hope i’ll be like you one day :) now ik what i’ll study in futur

  6. Karan Singh Chauhan
    December 28, 2012 at 10:23 AM

    Very Useful Post Here! DNS is something great.


  7. debasish
    December 28, 2012 at 4:24 PM

    valuable discussion .

  8. debasish
    December 28, 2012 at 4:30 PM

    sir ,
    I want to know how “extentions” work through web browsers.
    will you help me?

  9. shabeer
    January 6, 2013 at 5:12 PM

    Very easy to understand. Good Job.

  10. tushar
    January 6, 2013 at 5:35 PM

    Valuable information…
    pls explain more about root servers…thanx in advance

  11. Sanjay
    January 6, 2013 at 8:13 PM

    your the best….

  12. vipin
    January 7, 2013 at 9:52 AM

    article become so good if u specify type of dns record……

  13. Zardari
    January 8, 2013 at 12:29 AM

    Very nicely written article indeed, clears many doubts, thank you!

    Greetings from Pakistan.

  14. raytom
    January 8, 2013 at 9:26 PM

    Hi srikanth this is really awesome post DNS is a huge concept you made that short and sweet. We appreciate your work keep it up.

  15. TIK
    January 12, 2013 at 10:34 AM

    HI…. Srikanth..

    Your information for hacking is so great….. I have no words to explain. I’m dumb in hacking related stuffs, however after reading ur posts I started understand ver y well. The good thing about ur posts is “Very simple & clear”. Do u help us more?

  16. TIK
    January 12, 2013 at 10:39 AM

    I didn’t had neccesity to learn hackking until some disaster in my past. Now i’m desparate to learn hacking since i have no other hope of finding my missing family member. I know where the informations are, but i can’t access it, and no one to help me providing those information. Due to privacy act. What a crap. What can i do ..? I geniuenly request them. they say No” What should i do?

  17. Aditya
    January 13, 2013 at 12:12 PM

    Nice explanation

  18. JK Gupta
    January 13, 2013 at 10:21 PM

    Dear Srikanth,

    i have been regularly visiting your site to learn and understand the complex knowledge of computers and networking which you explain in a simple way that a non technical person also understands and appreciates.

    I sincerely thank u for your website. Regards

    JK Gupta

    • Srikanth
      January 13, 2013 at 10:39 PM

      You’re welcome. I appreciate your feedback. :)

  19. SAM
    January 28, 2013 at 10:15 AM

    great work … ur service is essential for newbies n all …keep going

  20. Saqlain
    February 5, 2013 at 2:40 AM

    Great Bro

  21. Anmol Arora
    February 15, 2013 at 1:00 PM

    An awesome one…Keep up your great work..!! 😀

  22. Sreejith
    March 7, 2013 at 3:57 PM

    Thank You. It was very informative!!!

    March 25, 2013 at 9:16 PM

    It is really very informative….
    Nyc work

  24. zz
    March 26, 2013 at 12:46 PM

    great things on your site visit me too

    March 30, 2013 at 10:29 AM

    thanks srikant

  26. slychaka
    August 6, 2013 at 3:05 PM

    great work u really inspire help and motivate me .Once again thanks Srikanth

  27. Rex
    June 3, 2014 at 7:24 AM

    Thank you a lot for the post. Its really great and I am learning a lot.

  28. Sushil Subedi
    July 25, 2014 at 7:31 AM

    good job..bro I like it and thank you..keep it up

  29. jesuovie
    August 2, 2014 at 8:35 PM

    Nice. I’m beginning to get lot of inspirations from you. You’re a mentor

  30. nagaraju
    October 27, 2014 at 12:31 PM


Leave A Reply