What Is DNS? How the Domain Name System Works, in Plain English

Quick answer

DNS (the Domain Name System) is the internet's address book. It translates a domain name such as example.com into the numeric IP address of the server that hosts the site or handles its email. When you type a web address, your device asks DNS servers for that address, then connects to it.

Why DNS exists

Computers find each other on the internet using IP addresses, such as 192.0.2.10 (IPv4) or 2001:db8::10 (IPv6). People are much better at remembering names. DNS bridges the gap: you remember example.com, and DNS supplies the number.

It also lets things change behind the scenes. If you move your website to a new host, you update one DNS record and visitors keep using the same domain. Nobody needs to learn a new address.

How a DNS lookup works

When you visit a website for the first time, a chain of servers answers your device’s question, “What is the IP address for example.com?”

  1. Your device checks its own cache. If it looked up the name recently, it already has the answer.
  2. It asks a recursive resolver. This is usually run by your internet provider, or by a public service such as Google Public DNS or Cloudflare’s 1.1.1.1. The resolver does the legwork for you.
  3. The resolver asks a root server where to find servers for the top-level domain, such as .com.
  4. It asks the TLD servers which nameservers are responsible for example.com.
  5. It asks those authoritative nameservers for the record it needs. They hold the real answer.
  6. The resolver returns the IP address to your device and keeps a copy for a set time (the TTL), so the next lookup is faster.
  7. Your browser connects to that IP address and loads the site.

All of this usually happens in a fraction of a second, and most lookups are answered from a cache long before they reach the root servers.

The main parts of DNS

PartWhat it doesWho usually runs it
Recursive resolverFinds answers on your behalf and caches themYour internet provider or a public DNS service
Root serversPoint to the servers for each top-level domainIndependent operators, coordinated through IANA
TLD serversPoint to the nameservers for each domainThe registry for that extension
Authoritative nameserversHold your domain’s actual recordsYour registrar, host or DNS provider

The part you control as a domain owner is the last one. Your registrar records which nameservers your domain uses, and you add records at whichever provider runs them.

Common DNS records

DNS records are individual entries that answer specific questions about your domain.

RecordWhat it doesTypical use
APoints a name to an IPv4 addressYour website’s server (more on A records)
AAAAPoints a name to an IPv6 addressThe same, for IPv6
CNAMEPoints a name to another namewww or a subdomain on a hosted platform (more on CNAMEs)
MXSays which servers receive emailGoogle Workspace, Microsoft 365 and similar
TXTHolds text, often for verificationDomain ownership checks, SPF, DKIM and DMARC
NSLists the domain’s nameserversSet automatically or by your registrar

Most website owners only ever touch A, CNAME, MX and TXT records.

What is TTL?

Every record has a TTL (time to live), measured in seconds. It tells resolvers how long they may cache the answer. A TTL of 3600 means one hour. Short TTLs make changes take effect faster; long TTLs reduce lookups. When people talk about waiting for DNS changes to “propagate”, they mostly mean waiting for old cached answers to expire. Our DNS propagation guide covers this in detail.

Where you manage your DNS

Your DNS is managed wherever your domain’s nameservers point:

  • Your registrar, if you’ve never changed the nameservers.
  • Your website builder or host, if you followed their setup and switched nameservers to them.
  • A dedicated DNS provider, such as Cloudflare, if you moved your DNS there.

If you edit records in one place and nothing happens, check that it’s the provider your nameservers actually point to. This is one of the most common causes of confusion.

Is DNS secure?

Traditional DNS was not designed with strong security. Two improvements are worth knowing about:

  • DNSSEC adds digital signatures so resolvers can check that answers haven’t been tampered with. You can usually turn it on at your DNS provider, and it must also be enabled at your registrar.
  • Encrypted DNS (DNS over HTTPS or DNS over TLS) protects the lookup between your device and the resolver from eavesdropping. This is mostly a browser and operating-system setting.

For domain owners, the bigger practical risks are simpler: an expired domain or a hijacked registrar account. Turn on auto-renew and two-factor authentication.

What next?

Ready to point a domain at your site? Follow our guide on how to connect a domain to a website.

Frequently asked questions

Is DNS the same as web hosting?

No. Hosting is the server that stores and serves your website. DNS is the directory that tells browsers where that server is. They are often sold by the same company but are separate services.

Who controls the DNS for my domain?

Whoever runs the nameservers your domain points to. By default that is usually your registrar, but you can switch to your host, a website builder or a DNS service such as Cloudflare.

Can a DNS mistake take my website or email offline?

Yes. Deleting or mistyping a record can make your site unreachable or stop email arriving. Take a screenshot or export of your records before making changes.

What is a public DNS resolver?

It is a free resolver, such as Google Public DNS or Cloudflare's 1.1.1.1, that you can use instead of your internet provider's. It changes how you look up other sites, not how others find yours.

Sources

  1. RFC 1034: Domain Names — Concepts and Facilities
  2. Cloudflare Learning Center: What is DNS?
  3. MDN Web Docs: DNS
Editorial Team

Plain-language guides to domain names and building websites. Articles are drafted with AI and list their sources; some are also reviewed by a person with domain-industry experience.