01
What Is DNS?

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

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 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 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 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.
07
DNS Security, Privacy, and Reliability

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
Try a related browser tool
Use these free tools to explore a concept from this guide directly in your browser.
From Then vs Now
See how the technology evolved
Continue with accessible history episodes connected to this explainer.
Continue Learning
Related technology explainers
Continue with guides selected from shared subjects and concepts.

Internet & Networking
How Does the Internet Really Work?
Understand how the Internet connects independent networks and moves data using IP addresses, DNS, routing, packets, TCP, QUIC, TLS, HTTP, servers and physical infrastructure.
Read guide
Web Development
What Happens When You Type a URL?
Follow a URL through parsing, DNS, TCP or QUIC, TLS, HTTP, server processing, caching and browser rendering until a webpage becomes interactive.
Read guide
Web Development
How Websites Work
Learn how a URL becomes a webpage through DNS, HTTPS, servers, HTML, CSS, JavaScript, APIs, databases, browser rendering, hosting, and caching.
Read guideShare this explainer
More from Tech Explained
Browse all topics in plain language.


