DNS resolution or domain resolution is the process of obtaining a domain name’s IP address. But how does it happen? Here you have a breakdown of the process of DNS resolution, explained step-by-step.
DNS resolution, or getting the IP address behind a domain name takes many steps. The DNS has a tree structure, with different levels that are responding queries for the zones (domains) that they keep. Each server that keeps the original data for a zone is called an authoritative DNS server, and it will have the most updated information about it. The other important part of the process is the DNS resolvers. They are DNS servers that search for answers and keep them based on the data’s TTL values.
To make it clear, let’s use this domain for our example: SiteIwant.com.
1. Start of the DNS query
If you want to visit the site, you will type the domain name SiteIwant.com in your browser. Then, your device will need to find the A or AAAA record of that domain name. The A record has the IPv4 address and the AAAA the IPv6 address. One of them is enough to visit the site.
2. Checking the local cache
Each device has its own cache. Even the browser can have an additional one. So the first thing that the device will do is to see if you have visited the site before and still have the records saved. If that is the case, it will use them, and the process will finish. If they are not there, the query will continue to another DNS resolver.
3. Asking the DNS resolver of your Internet Service Provider (ISP)
Your device will ask another DNS resolver for the answer. Then next on the way is the one at your ISP. If it has it, it will return the needed record. If not, the search will continue.
4. Start of the Interactive DNS queries and the Root DNS server
The resolver will use interactive DNS queries to find the best answer. The first server that it will ask is the one with the highest level – the root. The root is marked with a “.” on the right of the TLD (top-level domain). Its authority is to know where the TLD servers are. In this case, it will check the domain name, .com TLD, and point the resolver to their authoritative servers.
5. Query the TLD servers
The TLD servers are authoritative for their zone only, so they will know where the authoritative DNS servers of SiteIwant.com are located, but not the IP address of the site itself. So they will return the answer to the resolver again.
6. The final question – the authority server of the domain name.
Now that the resolver finally knows which is the authoritative name server of the domain name, it will ask it for the name records. The authoritative will provide the answer to the DNS query to the resolver.
7. The resolver answer the DNS query
The resolver has already found the answer, and now it sends it to your device.
8. The domain name is resolved
Your device receives the DNS record and successfully resolves the domain name SiteIwant.com. You can finally visit the site, and your local resolver will keep the DNS records, the time their TTL indicates.
Now you can understand better the different elements and all the steps the DNS resolution takes. It is a process with many steps, but it only takes a moment of time. How amazing the technology is!