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?”
- Your device checks its own cache. If it looked up the name recently, it already has the answer.
- 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.
- The resolver asks a root server where to find servers for the top-level domain, such as .com.
- It asks the TLD servers which nameservers are responsible for example.com.
- It asks those authoritative nameservers for the record it needs. They hold the real answer.
- 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.
- 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
| Part | What it does | Who usually runs it |
|---|---|---|
| Recursive resolver | Finds answers on your behalf and caches them | Your internet provider or a public DNS service |
| Root servers | Point to the servers for each top-level domain | Independent operators, coordinated through IANA |
| TLD servers | Point to the nameservers for each domain | The registry for that extension |
| Authoritative nameservers | Hold your domain’s actual records | Your 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.
| Record | What it does | Typical use |
|---|---|---|
| A | Points a name to an IPv4 address | Your website’s server (more on A records) |
| AAAA | Points a name to an IPv6 address | The same, for IPv6 |
| CNAME | Points a name to another name | www or a subdomain on a hosted platform (more on CNAMEs) |
| MX | Says which servers receive email | Google Workspace, Microsoft 365 and similar |
| TXT | Holds text, often for verification | Domain ownership checks, SPF, DKIM and DMARC |
| NS | Lists the domain’s nameservers | Set 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