What is DNS?

Инфографика с объяснением того, что такое DNS — интернет-справочник, переводящий доменные имена в IP-адреса

So what is DNS, exactly? DNS (Domain Name System) is the internet’s directory service. It translates human-readable domain names like example.com into the numeric IP addresses computers use to find each other.

The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.

Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS servers eliminate the need for humans to memorize IP addresses. IPv4 addresses look like 192.168.1.1, while newer IPv6 addresses use a longer alphanumeric format such as 2400:cb00:2048:1::c629:d7a2.

How does DNS work?

The process of DNS resolution converts a hostname (such as www.example.com) into a computer-friendly IP address (such as 192.168.1.1). Every device on the Internet has its own IP address. Computers use that address to find a device, the same way people use a street address to find a home. When a user wants to load a webpage, DNS translates what they type into their browser into a machine-friendly address. That address locates the actual webpage the browser needs to display.

To understand DNS resolution, it helps to learn about the different hardware components a DNS query passes between. For the web browser, this DNS lookup happens “behind the scenes.” It requires no interaction from the user beyond the initial request.

4 DNS servers work together to load a webpage:

  • DNS recursor — Think of the DNS recursor as a librarian asked to go find a particular book somewhere in a library. The DNS recursor is a server that receives queries from client machines through applications such as web browsers. Typically, the recursor is then responsible for making additional requests to satisfy the client’s DNS query.
  • Root nameserver — The root server is the first step in translating (resolving) human readable host names into IP addresses. Think of it like an index in a library that points to different racks of books. Typically, it serves as a reference to other, more specific locations.
  • TLD nameserver — Think of the top level domain server (TLD) as a specific rack of books in a library. This nameserver is the next step in the search for a specific IP address. It hosts the last portion of a hostname — in example.com, the TLD server is “com.”
  • Authoritative nameserver — Think of this as a dictionary that translates a name into its definition. The authoritative nameserver is the last stop in the nameserver query. If the authoritative name server has access to the requested record, it returns the IP address for the requested hostname. This goes back to the DNS Recursor (the librarian) that made the initial request.

Authoritative vs. Recursive DNS Servers: The Difference

Both concepts refer to servers (groups of servers) that are integral to the DNS infrastructure. Each performs a different role and lives in a different location inside the pipeline of a DNS query. One way to think about the difference: the recursive resolver sits at the beginning of the domain name system (DNS) query. The authoritative nameserver sits at the end.

Recursive DNS resolver

The recursive resolver is the computer that responds to a client’s recursive request and tracks down the DNS record. It does this by making a series of requests until it reaches the authoritative DNS nameserver for the requested record. If no record exists, the request times out or returns an error. Luckily, recursive DNS resolvers do not always need multiple requests to track down the records a client needs. Caching helps by storing recently requested records so the resolver can serve them faster, short-circuiting the DNS lookup.

Схема DNS-кеширования, ускоряющего повторные запросы за счёт хранения ранее полученных записей

Authoritative DNS server

Put simply, an authoritative DNS server is a server that actually holds, and is responsible for, DNS resource records. This is the server at the bottom of the DNS lookup chain. It responds with the queried resource record. This lets the browser reach the IP address needed to access a website or other web resource. An authoritative nameserver can satisfy queries from its own data, without needing to query another source. It is the final source of truth for certain domain name system (DNS) records.

Диаграмма работы авторитетного DNS-сервера, который хранит и выдаёт записи для конкретного доменного имени

It’s worth mentioning that some queries target a subdomain, such as foo.example.com or blog.example.com. In those cases, an additional nameserver joins the sequence after the authoritative nameserver and stores the subdomain’s CNAME record.

Схема сравнения рекурсивных DNS-резолверов разных провайдеров — Google DNS, OpenDNS и Comcast

There is a key difference between many DNS services. Providers such as Google DNS, OpenDNS, and Comcast all maintain data center installations of DNS recursive resolvers. These resolvers allow for quick and easy queries through optimized clusters of DNS-optimized computer systems. However, they are fundamentally different from the nameservers hosted by your own company or by a service like Cloudflare.

Cloudflare maintains infrastructure-level nameservers that are integral to the functioning of the Internet. One key example is the f-root server network which Cloudflare is partially responsible for hosting. The F-root is one of the root-level DNS nameserver infrastructure components. It helps handle billions of Internet requests every day. Our Anycast network puts us in a unique position to handle large volumes of DNS traffic without service interruption.

What are the steps in a DNS lookup?

For most situations, DNS translates a domain name into the appropriate IP address. To learn how this process works, follow the path of a DNS lookup. It travels from a web browser, through the DNS lookup process, and back again. Let’s take a look at the steps.

Note: The system often caches DNS lookup information, either locally on the querying computer or remotely in the DNS infrastructure. There are typically 8 steps in a DNS lookup. When a device already has the DNS information in its cache, the lookup process skips steps, which makes it quicker. The example below outlines all 8 steps for an uncached lookup.

The 8 steps in a DNS lookup:

  1. A user types ‘example.com’ into a web browser. The query travels onto the Internet, where a DNS recursive resolver receives it.
  2. The resolver then queries a DNS root nameserver (.).
  3. The root server responds with the address of a Top Level Domain (TLD) server, such as .com or .net. That TLD server stores the information for its domain. When searching for example.com, our request goes to the .com TLD.
  4. The resolver then makes a request to the .com TLD.
  5. The TLD server then responds with the IP address of the domain’s nameserver, example.com.
  6. Lastly, the recursive resolver sends a query to the domain’s nameserver.
  7. The nameserver then returns the IP address for example.com to the resolver.
  8. The DNS resolver then responds to the web browser with the IP address of the domain requested initially.
  9. The browser makes a HTTP request to the IP address.
  10. The server at that IP returns the webpage, which the browser renders (step 10).
Пошаговая диаграмма полного цикла DNS-запроса от браузера до получения IP-адреса сайта

What is a DNS resolver?

The DNS resolver is the first stop in the DNS lookup. It is responsible for dealing with the client that made the initial request. The resolver starts the sequence of queries that ultimately translates a URL into the necessary IP address.

Note: A typical uncached DNS lookup will involve both recursive and iterative queries.

It’s important to differentiate between a recursive DNS query and a recursive DNS resolver. The query refers to the request made to a DNS resolver requiring the resolution of the query. A DNS recursive resolver is the computer that accepts a recursive query and processes the response.

Диаграмма трёх типов DNS-запросов, используемых в типичном процессе разрешения доменного имени

What are the types of domain name system (DNS) queries?

In a typical DNS lookup three types of queries occur. By combining these queries, DNS resolution can reduce the distance traveled. In an ideal situation cached record data will be available, allowing a DNS name server to return a non-recursive query.

3 types of DNS queries:

  1. Recursive query  — In a recursive query, a DNS client requires a response from a DNS server (typically a DNS recursive resolver). That server must return either the requested resource record or an error message if it can’t find the record.
  2. Iterative query — in this situation the DNS client will allow a DNS server to return the best answer it can. If the queried DNS server does not have a match for the query name, it returns a referral. This points to a DNS server authoritative for a lower level of the domain namespace. The DNS client will then make a query to the referral address. This process continues with additional DNS servers down the query chain until either an error or timeout occurs.
  3. Non-recursive query — typically this occurs when a DNS resolver client queries a DNS server for a record it already has access to. This happens either because the server is authoritative for the record or because the record exists in its cache. Typically, a DNS server will cache DNS records to prevent additional bandwidth consumption and load on upstream servers.

What is DNS caching? Where does DNS caching occur?

The purpose of caching is to temporarily store data in a location that improves performance and reliability for data requests. Domain name system (DNS) caching stores data closer to the requesting client, so the DNS query can resolve earlier. This avoids additional queries further down the DNS lookup chain, improving load times and reducing bandwidth and CPU consumption. DNS data lives in a variety of cache locations. Each location stores DNS records for a set amount of time, determined by a time-to-live (TTL).

Browser DNS caching

By default, modern web browsers cache DNS records for a set amount of time. The purpose here is simple. The closer the DNS caching happens to the web browser, the fewer steps it takes to check the cache. This also means fewer steps to send the correct request to an IP address. When the browser requests a DNS record, it checks its own cache first.

In Chrome, you can see the status of your DNS cache by going to chrome://net-internals/#dns.

Operating system (OS) level domain name system (DNS) caching

The operating system level DNS resolver is the second and last local stop before a DNS query leaves your machine. The process inside your operating system that handles this query is commonly called a “stub resolver” or DNS client. When a stub resolver gets a request from an application, it first checks its own cache. It looks to see if the cache already has the record. If it does not, it sends a DNS query — with a recursive flag set — outside the local network. This goes to a DNS recursive resolver inside the Internet service provider (ISP).

When the recursive resolver inside the ISP receives a DNS query, it follows the same pattern as the previous steps. It checks whether it already has the host-to-IP-address translation stored in its local cache.

The recursive resolver also has additional functionality depending on the types of records it has in its cache:

In the unlikely event that the resolver lacks records pointing to the TLD servers, it queries the root servers instead. This typically happens right after a DNS cache purge.

If the resolver has the NS records for the authoritative nameservers but lacks the A records, it queries those name servers. This bypasses several steps in the DNS query. This shortcut skips lookups from the root and .com nameservers (in our search for example.com). It helps the DNS query resolve more quickly.

If the resolver lacks the NS records, it sends a query to the TLD servers (.com in our case). This skips the root server.

Information reviewed and updated: August 28, 2026.

Published by: REVOLD BLOG – blog.revold.us
Powered by
AIR RISE INC & REVOLD AI
Sponsored:
CORPIUS

Author: Roman Kravchina