š It goes unnoticedāyou donāt realize it, but you are constantly using the DNS service.
What is the DNS service?
šÆ You have probably always heard that the DNS service is a name translator. It translates the name assigned to a website (for example, google.es) into an IP (for example 192.0.2.1 or 2001:db8:85a3:8d3:1319:8a2e:370:7348), which is required to connect.
But I want to go a bit further and look at how this system actually works.
š DNS works through a decentralized, hierarchical database that will always try to take you to your destination.
1ļøā£ It all starts with the root servers.
These are servers maintained by different operators (mostly US organizations). Their job is to serve, maintain, and update the root zone file. It is a small text file of about 200 KB; you can see it here: internic.net/domain/root.zoā¦
This file is essential. It tells you who you need to ask for each type of domain (TLDs, the final part after the dot).
- For .com domains, it points you to a.gtld-servers.net (and others).
- For .es domains, it points you to a.nic.es (and others).

2ļøā£ So now it is time to ask the specific server for that domain type.
For google.es, we would ask a.nic.es, but this server still does not give us the final answer; it tells us the next server we need to ask.
And here we need to draw a line that separates us. What has happened so far are “public” services funded by operators and domain purchases.

From this point on, the answer will be provided by our private DNS server.
3ļøā£ Your server for that domain (private DNS).
In this case, the google.es domain has several of its servers configured as the DNS servers to query: ns1.google.com ns2.google.com ns3.google.com ns4.google.com
Why do several always appear? The system is redundant so it keeps working even if a server or connection fails.
So we ask, and it tells us that in this case, to reach google.es you need to go to the IP 142.250.185.3.

Done!
So, to obtain the IP of a domain we have queried:
1ļøā£ Root servers: They give us the servers for that domain type.
2ļøā£ Servers for that domain type: They give us the servers for that specific domain.
3ļøā£ Servers for that domain: They give us the final answer.
This process would normally have fewer steps because both our computer and our internet provider cache at least part of this process, reducing the requests to 0, 1, or 2.
Beyond IP addresses
DNS does not only provide IPs; it has different record types for different purposes. A and AAAA records provide IPs, CNAME provides aliases, MX provides mail servers, and TXT includes text (usually used to declare information or for verification).
Characteristics of a DNS server
If you have a domain, it is important that your DNS server is reliable and redundant. Nowadays this is not difficult with most providers (many DNS servers are included with hosting), although there are still many providers that do not make it redundant.
But if you also have a website, ideally it should be fast, and if the site is aimed at a global audience, it is also worth having Anycast DNS (with servers distributed worldwide, so it responds faster in different regions).
Keep in mind that when someone visits your website, the first request madeāand the first thing that takes timeāis the DNS request.
For example, if that request takes 200 ms, you already start with that baseline delay, at least on the first load. On this website, DNS load time (blue) accounts for almost 1/4 of the siteās initial load time.

This tool allows us to see your domainās DNS response time in different parts of the world.


With a few exceptions, but in general it delivers good responses worldwide.
With this thread, I aimed to help you learn a bit more about DNS, see its technology, and understand where it stands right now. It is one of the most overlooked elements, but from time to time it is worth taking a look.
Bonus: Glue Records.
You may have noticed that the domain-type servers in step 2ļøā£ give you a domain to reach the domainās DNS servers in step 3ļøā£. You would need to repeat the process again to obtain the IP of that domain, but could this not become an endless process?
Consider what happens if a domainās DNS servers are within the same domain 𤯠We run into an edge case, because to obtain the IP you have to ask the DNS server, but it is that same DNS that gives you the IP of the DNS server. š„
For example, the DNS server for google.com is ns1.google.com. How do we first find out the IP of ns1.google.com without asking ns1.google.com, and then obtain the IP of google.com?
This is done with special records called “Glue Records”, which store the IPs of the domainās DNS servers directly on the domain-type server in step 2ļøā£.
For example, here the DNS server a.gtld-servers.net gives us the IP addresses of Googleās DNS servers directly.

Did you know these details about DNS? Do you know any other details or curiosities?
