← All articles
Behind the Web

What Is DNS? The Internet's Address Book

Learn how the Domain Name System helps browsers find websites using human-friendly domain names.

Illustration of a domain name being resolved to an IP address

The internet uses numerical addresses to move information between devices. People, however, are much better at remembering names than long strings of numbers.

The Domain Name System (DNS) connects those two worlds. It is a distributed naming system that helps translate domain names into information such as IP addresses.

Why does DNS exist?

Imagine having to remember a separate IP address for every website you visit. DNS lets you use a memorable name such as example.com while the network uses the address associated with that name.

DNS is not one central phone book. It is a hierarchy of systems and servers that can work together to answer queries.

How a DNS lookup works

A typical lookup can involve several steps:

  1. Your browser or operating system checks its DNS cache.
  2. If it has no usable answer, your device contacts a recursive resolver.
  3. The resolver may ask a root DNS server where to find the relevant top-level domain servers.
  4. It can then ask the appropriate top-level domain server for the domain’s authoritative nameservers.
  5. The authoritative server provides the requested DNS record.
  6. The resolver returns the answer and may cache it for the record’s time to live (TTL).

Real-world lookups can be shorter because answers are often cached.

What is an IP address record?

A DNS A record maps a name to an IPv4 address. An AAAA record maps a name to an IPv6 address.

DNS also supports other record types, including:

  • CNAME: an alias to another domain name.
  • MX: mail exchange servers for a domain.
  • TXT: text data often used for verification and email security.
  • NS: nameservers responsible for a DNS zone.

Does DNS always use the same server?

No. Your device usually asks a recursive resolver, which performs the work of finding an answer. That resolver may be operated by your internet provider, an organization or a public DNS service.

The authoritative nameservers for a domain publish the records that define the domain’s DNS data.

What happens when DNS fails?

If a resolver cannot obtain a usable answer, your browser may show a name-resolution error. The website’s server might be perfectly healthy; your device simply cannot discover where to connect.

DNS problems can result from incorrect records, expired registrations, misconfigured nameservers, network problems or temporary resolver issues.

The takeaway

DNS is one of the internet’s essential pieces of infrastructure. It makes the web practical to use by allowing people to navigate with names while devices communicate using network addresses.

✳

Stay curious. Keep exploring.