TechnologyWhat is
What Is DNS?
DNS is the internet's naming system: it translates names like example.org into the numeric IP addresses computers use to reach each other.
2 sourcesPublished
Quick answer
DNS, the Domain Name System, is the internet's naming system. It translates a human-friendly name such as mozilla.org into the numeric IP address that computers use to reach a server. If DNS fails, a connection can be working perfectly while every website name still fails to load.
- DNS
The Domain Name System: a hierarchical and decentralized naming system that maintains a list of domain names together with the resources, such as IP addresses, associated with them.
What DNS actually does
People remember names; networks route by numbers. MDN describes the most prominent function of DNS as translating a domain name into a numeric IP address, a step called a DNS lookup. The numeric address in MDN's example is 192.0.2.172. Without this translation, you would need to type a string of digits for every site you visit, and a site could never change servers without telling everyone a new number.
The same system works in reverse. A reverse DNS lookup starts with an IP address and asks which domain name is associated with it. Reverse lookups are used mostly by administrators and mail systems rather than by ordinary browsing.
Why the system is hierarchical and decentralized
No single computer holds every name on the internet. The original design document, RFC 1034, splits the work between two kinds of components. Name servers hold information about a part of the naming tree, and resolvers are the programs that ask name servers questions on behalf of applications. A name such as www.example.org is read from right to left: the top-level domain (org), then the domain registered beneath it (example), then a host or label chosen by the owner of that domain (www).
Because each level is responsible only for its own slice, the system can grow without a central bottleneck. The organization that controls example.org can add or change its own records without asking anyone who runs a different domain.
What happens during one lookup
A typical lookup follows a short chain, and most of the time most of it is skipped because of caching.
- The application asks the local resolver. Your browser or operating system first checks whether it already knows the answer from a recent lookup.
- The resolver asks on your behalf. If it does not have the answer, a resolver, often run by your internet provider or a public service you chose, works through the hierarchy: root servers point to the servers for the top-level domain, and those point to the servers that are authoritative for the specific domain.
- The authoritative server answers. It returns the record for the name asked about, for example the IP address of the web server.
- The answer is cached and used. The resolver keeps the answer for a limited time and hands it to your application, which then opens the actual connection to that address.
RFC 1034 describes this caching explicitly: resolvers may store answers and reuse them, and each record carries a time-to-live value set by the zone owner that limits how long a copy may be kept. That is why a changed record can look different from different places for a while.
Common record types
| Record | What it stores |
|---|---|
| A | An IPv4 address for a name |
| AAAA | An IPv6 address for a name |
| CNAME | An alias pointing one name to another name |
| MX | The mail servers that accept email for a domain |
| NS | The name servers responsible for a domain |
| TXT | Free-form text, often used for domain verification and email policy |
Most readers will never edit these records, but knowing the names helps when a hosting provider or email service asks you to "add a TXT record" or "point an A record" at an address.
DNS problems look like internet problems
Because DNS sits between a name and a connection, its failures can look like a general outage. A page that will not load while an app that connects by address still works is a classic sign. A quick way to separate the layers is to check whether a site opens when you use its numeric address, or whether a different resolver can find the name. The Wi-Fi vs Internet guide shows how to work through the layers in order, and the IP address guide explains the numbers that DNS returns.
Slow to update is not the same as broken
After a domain owner changes a record, resolvers around the world may keep serving the old answer until its stored copy expires. A change that appears to work for you but not for a colleague is often cache timing, not a fault.
Privacy and who sees your lookups
Whoever runs your resolver can see which names your devices ask about, even if the content of the pages is protected by encryption. That is why some people choose a different public resolver or enable encrypted DNS in their browser or operating system. MDN lists DNS over HTTPS among the related concepts for this reason. Encrypted DNS hides the questions from observers on the local network, but it does not hide them from the resolver you pick, so the choice of resolver is a trust decision rather than a purely technical one.
Sources
- DNS (Glossary) — MDN Web Docs
- RFC 1034: Domain Names - Concepts and Facilities — Internet Engineering Task Force
Keep going