DNS, stands for " Domain Name System". Basically it helps to resolve names to IP numbers as it is much easier for people to remember logical names rather then a 12 digit number.
This is what happens when you type www.domainname.com into your computer's web browser:
- Your web browser asks the resolving DNS server about the address of www.domainname.com. Your computer already knows where the local ISP resolving DNS server is through its network configuration.
- The Resolving DNS server does not know the address. So it asks a root server the same question. The 13 root servers query randomly among themselves and select one root nameserver.
- The root server replies that it does not know, but it gives the address of the server which knows about .com domains.
- The resolving DNS server asks the .com server what the address of www.domainname.com is.
- The .com server replies that it does not know, but it gives the address of the server which knows about .domainname.com domain. This server can be a managed server and many companies pay an annual fee (via a domain registar) to maintain this referral for their domain.
- The resolving DNS server asks the .domainname.com server what the address of www.domainname.com is.
- The server answers the query with the IP address of www.domainname.com, and marks the response as authoratative. This is an assertion that the answer is correct and complete. It also adds to its reply that this data is valid for 24 hours, so that anyone who is asking can confidently re-use the information for that time without having to issue another query.
- The resolving DNS server finally has its answer, and can reply back to the web browser with the IP address. Crucially it marks its answer as non-authoratitive, so that the web browser knows it has the information indirectly.