Tech Explained·Internet & Networking·beginner guide

How DNS Works

Learn how the Domain Name System turns domain names into IP addresses, how a DNS lookup moves through resolvers and authoritative servers, and how records, caching, TTL, DNSSEC, and encrypted DNS work.

8 min read·Published October 10, 2026·NVR Nexus
How DNS Works cover showing a domain lookup moving through DNS servers to an IP address

Listen to this explainer

How DNS Works

9 parts · Tap play to start

Uses a natural English voice available through your browser or device. Article text is not uploaded to NVR Nexus.

01

What Is DNS?

A domain name passing through DNS servers before reaching a destination server
Visual key:Domain name → DNS lookup → IP address → destination server.

DNS stands for Domain Name System. It is the distributed system that helps applications find Internet services by translating names people can remember into technical records computers can use.

A person may enter a domain such as example.com, but a browser ultimately needs an IP address before it can connect to the correct server. DNS supplies that address when the domain has a matching A or AAAA record. It can also publish information used for email delivery, service verification, aliases, and other Internet functions.

DNS is often described as the Internet's phone book. The comparison is useful, but DNS is not one central directory. It is a worldwide hierarchy operated by many independent organizations. Domain owners control their records, authoritative DNS providers publish those records, and recursive resolvers find and cache answers for users.

DNS usually handles only the hostname portion of a web address. For a URL such as https://example.com/products?id=10, DNS looks up example.com. The browser and web server handle the protocol, path, and query string separately.

Once DNS returns a usable address, the browser can begin its network connection. HTTPS negotiation and the request for the webpage happen after that lookup. DNS helps locate the destination; it does not download or render the website itself.

02

The DNS Hierarchy: Root, TLD, and Authoritative Servers

A hierarchy of root, top-level-domain, and authoritative DNS server groups
Visual key:Root servers → TLD servers → authoritative servers for the domain.

DNS names are organized as a hierarchy. Reading a name from right to left reveals increasingly specific levels. In www.example.com, the final dot is the DNS root, com is the top-level domain, example is the registered domain, and www is a host or subdomain chosen by the domain owner.

Root DNS servers sit at the top of the public DNS hierarchy. They do not normally store the final IP address for every website. Instead, they direct resolvers toward the servers responsible for a top-level domain such as .com, .org, or a country-code domain.

Top-level-domain, or TLD, servers know which authoritative name servers are responsible for domains registered beneath that TLD. A .com TLD server can direct a resolver toward the authoritative servers for example.com.

Authoritative DNS servers publish the records for a domain's DNS zone. When asked for a record they manage, they provide the definitive answer or indicate that the requested name or record does not exist.

This delegation model allows DNS to scale. No single server needs to store or answer for every domain. Responsibility is divided from the root to TLD registries and then to the authoritative systems selected by each domain owner.

03

What Happens During a DNS Lookup?

A DNS query travelling from a device through resolver and DNS hierarchy servers before returning
Visual key:Device → recursive resolver → root → TLD → authoritative server → answer returned to the device.

A DNS lookup often finishes from cache, but a completely uncached lookup shows how the system fits together.

First, the browser and operating system check whether they already have a valid answer. A home router or local network may also retain a cached response. If none is available, the device's small DNS client, called a stub resolver, sends the question to a recursive resolver.

The recursive resolver may be operated by an Internet service provider, organization, public DNS service, or private network. It accepts responsibility for finding the answer and returning it to the device.

If the resolver has no cached answer, it asks a root server where to find the relevant TLD. It then asks a TLD server where to find the domain's authoritative name servers. Finally, it asks an authoritative server for the requested record, such as the A record for an IPv4 address.

The authoritative answer travels back to the recursive resolver. The resolver caches it for the permitted time and returns it to the device. The browser can then connect to the destination IP address.

The resolver normally performs these referrals on the user's behalf, so the device does not contact every layer directly. Cached referrals and records also mean that many real lookups skip one or more steps and complete very quickly.

04

Common DNS Record Types

DNS record concepts for web addresses, aliases, mail, name servers, and verification
Visual key:A/AAAA: addresses · CNAME: alias · MX: mail · NS: name servers · TXT: verification and policy.

DNS can publish several kinds of records. Each type answers a different question.

An A record maps a name to an IPv4 address. An AAAA record maps a name to an IPv6 address. These records commonly direct website traffic to servers or network services.

A CNAME record makes one name an alias of another canonical name. It is useful when several hostnames should follow a service whose underlying destination may change. The resolver continues looking up the target name until it reaches the required address records.

An MX record identifies the mail servers that accept email for a domain. Its priority value helps sending systems choose among multiple mail servers.

An NS record identifies the authoritative name servers for a DNS zone or delegated child zone. These records are part of the delegation chain that leads resolvers to the correct authority.

A TXT record stores text data. It is widely used for domain ownership checks and email-security policies such as SPF, DKIM, and DMARC. Other record types support service discovery, certificate controls, reverse lookups, and additional specialized functions.

A single hostname can have multiple records. Large services may return several addresses for availability or traffic distribution, and the returned answer can vary by location, network, or provider design.

05

DNS Caching, TTL, and Propagation

DNS answers stored in several cache layers until their time to live expires
Visual key:Browser or device cache → local network cache → recursive resolver cache → fresh lookup after TTL expiry.

DNS caching reduces delay and prevents the hierarchy from receiving a fresh query for every visit. Browsers, operating systems, routers, and recursive resolvers may temporarily store an answer they have already received.

Each record has a TTL, or time to live, expressed in seconds. The TTL tells caching systems how long they may reuse the record before asking for a fresh answer. A longer TTL can reduce query traffic and improve cache hit rates. A shorter TTL can make planned record changes visible sooner, although it causes more frequent lookups.

When a DNS record changes, different users may temporarily receive different answers. One resolver may still hold the previous record while another has already refreshed it. This transition is commonly called DNS propagation, but it is mostly the result of cached data expiring at different times rather than one update physically travelling to every DNS server.

Lowering the TTL before a planned migration can shorten the period during which old answers remain cached. It does not instantly erase records already cached under an earlier, longer TTL.

Negative answers can be cached too. If a resolver recently learned that a name does not exist, adding the name immediately afterward may not become visible to that resolver until its negative cache expires.

06

Recursive Resolvers vs Authoritative DNS

A recursive resolver searching the DNS hierarchy beside an authoritative server answering from its zone
Visual key:Recursive resolver: finds and caches answers · Authoritative server: publishes the zone's definitive records.

Recursive and authoritative DNS servers perform different jobs.

A recursive resolver works for the requester. It accepts a question from a device, searches the DNS hierarchy when necessary, follows referrals, validates eligible DNSSEC data when configured to do so, caches the result, and returns a final answer.

An authoritative server works for a domain or DNS zone. It stores and publishes that zone's records. It answers from the data it is responsible for instead of searching the wider DNS hierarchy on the user's behalf.

This difference matters when troubleshooting. If an authoritative server publishes the correct new record but a recursive resolver still returns the old value, the likely cause is caching. If the authoritative server itself returns the wrong value, the zone configuration or delegation needs attention.

Domain registrars, DNS hosting providers, and recursive DNS providers can be separate organizations. A registrar records the domain registration and its delegated name servers. A DNS host operates the authoritative service. A recursive provider performs lookups for users. Some companies offer more than one of these services, but the roles remain distinct.

07

DNS Security, Privacy, and Reliability

An encrypted and protected DNS network with redundant servers across the world
Visual key:DoH/DoT: encrypted resolver connection · DNSSEC: authentic records · distributed servers: resilience.

Traditional DNS was designed for interoperability, not strong privacy or authentication. Modern protections address different parts of that problem.

DNSSEC adds cryptographic signatures to DNS data so a validating resolver can check that an answer is authentic and has not been altered in transit. DNSSEC does not encrypt the query or hide the requested domain. It protects the integrity and origin of signed DNS records.

DNS over HTTPS, called DoH, and DNS over TLS, called DoT, encrypt DNS traffic between a device and its chosen recursive resolver. This makes the query harder for observers on that network path to read or modify. The resolver still receives the query, and DNS encryption does not make general web browsing anonymous.

Reliability comes from distribution and redundancy. Important zones normally use multiple authoritative servers, often spread across networks and geographic locations. Anycast routing can make the same DNS service address available from many sites, helping direct users to a nearby healthy location.

DNS failures can prevent a service from being reached even when its web servers are working. Reliable operators therefore monitor delegations, record correctness, DNSSEC signatures, expiration times, response latency, and the availability of authoritative servers.

For users, a trusted resolver, current device software, HTTPS websites, and sensible network-security practices work together. DNS is one critical layer of Internet communication, but it is not a complete privacy or security system by itself.

About this explainer

This guide is an introductory educational overview. Technology, standards, and product behavior can change, and implementations may differ. For production, security, or specification decisions, confirm details with current official documentation and primary sources.

Frequently asked questions

Quick answers to common questions.

Put It into Practice

Use these free tools to explore a concept from this guide directly in your browser.

From Then vs Now

Continue with accessible history episodes connected to this explainer.

Continue Learning

Continue with guides selected from shared subjects and concepts.

Share this explainer

More from Tech Explained

Browse all topics in plain language.

All topics