DNS (domain name system) is the distributed directory that translates domain names such as www.example.com into the data computers need to reach them, most often IP addresses. It is organized as a hierarchy of zones, each administered by whoever owns that part of the namespace, and queried by resolvers that work on behalf of applications. The design dates from RFC 1034 and RFC 1035, published in 1987, and the core model is unchanged: a name goes in, a set of resource records comes out.
DNS is a lookup service, not a transport. DNS helps discover a destination; it does not carry the subsequent web request, which travels over IP. A page can still trigger additional lookups for other resources. Keeping those two steps apart explains most of the confusion about what changing a DNS setting can and cannot achieve.
From a Domain Name to an Answer
When a user opens www.example.com, the browser commonly asks the operating system's stub resolver for the address, although a browser may use its own cache or secure-DNS resolver. The stub checks its local cache, and if the name is unknown it sends a query to a configured recursive resolver, typically one run by the ISP, the organization's network, or a public resolver chosen in system settings. The query is a small message, usually carried in a single UDP packet to port 53, with a header, a question section naming the record wanted, and empty answer sections.
The recursive resolver does the work the stub cannot. If its own cache is empty, it asks a root server, which does not know the answer but refers it to the servers for the com zone. Those servers refer it in turn to the authoritative servers for example.com, which finally return the A or AAAA record for www. Each referral is an iterative step; RFC 1034 describes recursion, where one server pursues the whole chain for its client, as an optional service signalled by the recursion-desired bit in the query header. The resolver assembles the final answer, caches it, and sends it to the stub, which hands the address to the browser. In practice the chain is short because the com referral and most popular names are already cached.
Resolvers, Authoritative Servers and Caches
Three roles make the system work. A stub resolver lives in the operating system or application and knows only how to forward questions. A recursive DNS resolver accepts those questions, walks the hierarchy and caches responses; a validating resolver also checks DNSSEC where available, and is the component people mean when they talk about choosing or changing their DNS. Authoritative servers hold the actual zone data for a domain and provide authoritative answers for the zones they serve; RFC 1034 requires at least two of them per zone for redundancy.
Caching is governed by the time to live (TTL) attached to every record. The TTL is a number of seconds for which a resolver may reuse an answer before asking again; a TTL of zero means the record may be used once and not stored. Negative answers, meaning that a name does not exist, can also be cached for a period derived from the zone's SOA record. These timers are why a change to a record is seen by some users immediately and by others only after the old value expires from their resolver's cache, a delay usually described as propagation even though nothing is being pushed anywhere.
Common DNS Record Types
A zone contains DNS records of many types. Several widely used types are listed below; a domain need not publish every type.
| Type | Maps a name to | Typical use |
|---|---|---|
| A | An IPv4 address | Reaching a web or mail host over IPv4 |
| AAAA | An IPv6 address | The same over IPv6 (RFC 3596) |
| CNAME | Another name (the canonical one) | Pointing an alias such as www at a hosting hostname |
| MX | A mail server name with a preference value | Routing inbound email for the domain |
| NS | An authoritative name server for the zone | Delegation from the parent zone |
| TXT | Free-form text | Domain verification, SPF and similar policies |
| SOA | Zone metadata: primary server, serial, timers | Zone transfers and negative caching |
| PTR | A name, looked up from an address | Reverse lookups under in-addr.arpa and ip6.arpa |
A single name can carry several records of the same type, which is how one hostname advertises multiple addresses for load distribution, and it can carry different types at once, such as A, AAAA and MX for the bare domain. A CNAME is the exception: an alias cannot coexist with ordinary data such as A or MX records at the same name, apart from associated DNSSEC records, which is why the root of a zone generally uses A and AAAA records directly rather than a CNAME.
What DNS Does and Does Not Do
DNS answers the question of where a name points. It does not route traffic, host content or decide whether a connection is allowed. The web server, the hosting provider and the registrar are separate things: the registrar records who owns the domain and which name servers are authoritative, the authoritative servers publish the records, and the host at the published address serves the site. Changing any one of them does not change the others.
Encrypted variants protect one segment of the path. DNS over TLS (RFC 7858) wraps queries between the stub and the recursive resolver in TLS on port 853; DNS over HTTPS (RFC 8484) carries them inside HTTPS to a configured resolver URL. When properly authenticated and used without plaintext fallback, both protect those queries against local-network eavesdropping and undetected modification. Neither hides the queries from the resolver that answers them, which sees the queries it receives and usually the connecting IP address. These protocols do not by themselves protect the separate recursive-to-authoritative segment. Encrypted DNS is a privacy improvement for the first hop, not a VPN and not a guarantee that queries take any particular route.
Common Uses and Limitations
Beyond web addresses, DNS underpins email delivery through MX records, service discovery inside organizations, content delivery networks that return different addresses by region or load, and domain ownership checks through TXT records. Blocking resolvers use it as a policy point by refusing to answer for known malicious or unwanted names, which is possible precisely because the lookup happens before the connection.
Its limitations follow from its age and openness. Plain DNS is unauthenticated, so responses can be forged unless the zone is signed with DNSSEC and the resolver validates signatures, something RFC 8484 notes that HTTPS transport does not replace. Caching means changes take effect unevenly across the internet. The recursive resolver sees the queries sent to it, making DNS a useful source of metadata even when later web traffic is encrypted. Upstream servers usually see the resolver rather than the end user; QNAME minimisation can also avoid sending the full requested name to every server in the hierarchy. And DNS says nothing about the content behind an address: a correct answer for a malicious domain is still a correct answer.