Domain Name System – What is it?
The Domain Name System, or shortly DNS, is a decentralized system with a strictly established hierarchical composition for identifying devices and services on the Internet and private networks. It is one of the most important pieces of the Internet and serves for it to provide the best experience as it is nowadays.
Thanks to it, the queries for a specific domain name, such as example.com, are directed to all name servers on different levels. Each level gives a piece of information for the location of the domain name.
The Domain Name System assists with providing answers for domain name queries with the hosts’ IP address (IPv4 or IPv6).
In addition, it discovers services, validates them. It also can connect several domain names, points to server, redirects. Overall it makes our everyday use of the Internet a lot easier and simple.
The different required instructions are stored in text documents, also named DNS records. Your device, based on the query, is going to request one or several of these DNS records.
The DNS query proceeds among several DNS servers until it reaches the Authoritative DNS server and receives an answer.
- DNS record. The DNS records are short text files, and each of them serves a particular purpose. For instance, the A record links the domain name and IP address. There are lots of DNS record types.
- DNS query. Every query seeks a particular DNS record. The query begins from a device and bounces from a DNS server to another. That continues till one of them is able to resolve it.
- DNS recursive server. This server is operating in the middle between the user and the rest of the servers. It contains a cache memory where it could keep DNS records for a particular amount of time. The recursive DNS server will store the data from the moment a DNS query is successfully resolved and moves through it till the DNS record expires (depending on the TTL value). This server seeks the DNS records if they are not available anymore.
- DNS authoritative server. This is the primary DNS server that holds the original zone file, and it is able to provide an authoritative answer.
DNS query explained
- The user types in its browser the domain name, example.com.
- In case the user recently connected with the domain, the answer could still be in the cache memory. That way, the query will be solved. Yet, if it is not available in the cache, the query still needs an answer.
- The next step is the DNS recursive server of the Internet Service Provider (ISP). The chance is more significant to get the solution in the cache of the ISP. If it is there, the user will receive a response.
- If it is not available there, the next stop is the root name server. It can give an answer only for the last extension of the domain name, the TLD. It gives information which is the name server for that specific TLD. In our case is the .com TLD server.
- The TLD (Top-Level-Domain) name server shows which is the authoritative name server for the domain.
- The authoritative DNS server, for example.com, replies with the A or AAAA record. It points where the website is hosted.
- Then the user will connect to example.com. All of the DNS records are going to be kept both on the recursive DNS servers and the user’s device cache memory. Yet, only for a precise amount of time established in the TTL of the DNS records.
Related article: DNS resolution process described in detail