DNS, the Domain Name System, is the internet’s phone book. It turns a domain name such as example.com into the numeric IP address of the server that holds the website, so your browser knows where to go. You type a name, and DNS finds the address.
DNS turns a domain name into an IP address
Computers find each other by IP address, a string of numbers such as 203.0.113.10. People remember names. DNS connects the two, so nobody has to memorize numbers to visit a website.
Every domain name you own has DNS settings that say where its website lives, where its email goes and which servers answer for it. When you buy a domain name and a hosting plan, you connect them with DNS. Our guide to what web hosting is covers the hosting side.
What happens when you type a web address
A DNS lookup takes a fraction of a second and follows the same steps each time.
- You type a domain name into your browser.
- Your browser checks its own memory, then your computer’s, for a saved answer.
- If there is none, your device asks a DNS resolver, usually run by your internet provider or a public DNS service.
- The resolver asks a root server, which points it to the servers for the top-level domain, such as .com.
- The top-level domain servers point to the domain’s authoritative nameserver.
- The authoritative nameserver returns the IP address.
- Your browser connects to that address and loads the page.
The resolver saves the answer for a set time, so the next visit is faster. That saved time is called the TTL, short for time to live.
Four kinds of DNS server do the work
- Recursive resolver: the server that receives your question and goes looking for the answer.
- Root server: the starting point that knows where each top-level domain is handled.
- TLD server: the server for an extension such as .com, .org or .net. It knows which nameservers belong to each domain.
- Authoritative nameserver: the server that holds the real DNS records for your domain and gives the final answer.
The authoritative nameserver is the one you control. Our page on what a nameserver is explains how to find and change yours.
DNS queries come in three types: recursive, iterative and non-recursive
A DNS query is the question “what is the IP address for this name?” The type of query depends on who asks and how much work the server does.
- Recursive query: your device asks the recursive DNS resolver for the final answer. The resolver does all the work and returns either the IP address or an error.
- Iterative query: the resolver asks each server in turn. Each one replies with its best answer or a referral to the next server, such as the root server, then the TLD server, then the authoritative server.
- Non-recursive query: the resolver already knows the answer from its cache, or the server is authoritative for the name, so it answers at once.
Most home lookups combine the three. Your device sends a recursive query, and the resolver sends iterative queries on your behalf.
DNS caching makes repeat lookups faster, and it works at several levels
DNS caching stores recent answers so that servers do not repeat the full lookup. Your web browser keeps a local DNS cache. Your operating system keeps another. The recursive resolver at your internet service provider keeps a third, shared by many users.
Each cached answer expires when its TTL ends. A short TTL, such as five minutes, lets you change records quickly. A long TTL, such as a day, reduces lookup traffic. If a site looks wrong after a change, flushing your device’s DNS cache can clear an old answer.
DNS records tell the internet what to do with your domain
A DNS record is a single instruction stored in your domain’s DNS zone. A typical small website uses only a handful of them.
| Record | What it does |
|---|---|
| A | Points a domain name to an IPv4 address |
| AAAA | Points a domain name to an IPv6 address |
| CNAME | Points one name to another name, such as www to the main domain |
| MX | Says which mail servers receive email for the domain |
| TXT | Holds text, often used to prove ownership or to set up email authentication |
| NS | Lists the nameservers that answer for the domain |
If your website goes to the wrong place, the A record is usually the first thing to check. If your email stops arriving, check the MX records.
Where DNS settings live depends on who runs your nameservers
Your DNS records sit with whichever service your domain’s nameservers point to. That can be your domain registrar, your web host or a separate DNS service. You edit them in that provider’s dashboard.
Many hosts that use cPanel give you a DNS zone editor inside it. If you use cPanel, our page on what cPanel is shows what the control panel offers.
Cloudflare says its registrar includes free DNS, CDN and SSL with each domain, and that it sells domains at cost with no markup (checked on cloudflare.com on November 6, 2026).
A registrar is the company where you register the domain. It is not always the same company as your host. See the best domain registrar and how to buy a domain name if you have not registered one yet.
DNS changes can take time to reach everyone
When you change a DNS record, the new answer does not reach everyone at once. Resolvers around the world keep the old answer until its TTL runs out. This delay is often called DNS propagation.
In many cases a change shows up within minutes to a few hours. Some changes, especially to nameservers, can take up to 48 hours to reach every user. Lower the TTL on a record a day before a planned move and your change will spread faster.
That is why a website move needs a plan. Keep the old host running until the new one answers everywhere, as our website migration checklist explains.
How to point your domain at your web host
You can connect a domain to a host in two ways. Both end with visitors reaching your site.
- Change the nameservers. Your host gives you two or more nameserver addresses. You enter them at your registrar. After that, the host manages your DNS records.
- Edit the DNS records. You keep your current nameservers and add an A record, or a CNAME, that points to the host’s server.
The first is simpler. The second is better when you want email or other services to stay where they are. Your host’s help pages list the exact values to use. For a full move, see how to transfer a website to a new host.
The DNS hierarchy runs from the root down to your domain
The Domain Name System is a hierarchy, and every domain name reads from right to left through it. In www.example.com, the root is an invisible dot at the end, .com is the top-level domain, example is the second-level domain, and www is a subdomain.
Each level is managed by a different group of servers. Thirteen root server addresses, run by many organizations through hundreds of servers worldwide, sit at the top. Below them, registries run the TLD servers for .com, .org and country codes.
Below those, your DNS provider runs the authoritative servers for your domain. This DNS infrastructure is spread across the world on purpose, so no single failure takes the whole system down.
The DNS protocol itself is simple. Most DNS requests are small messages sent over UDP on port 53, and larger ones fall back to TCP. Domain name resolution is the whole process of turning a name into an IP address through these levels.
Free and paid DNS providers differ in speed, tools and support
Every domain needs a DNS service. Your registrar and your web host usually give you one for free, with a basic dashboard for adding records. A separate DNS provider can add faster global lookups, health checks, failover and a service-level guarantee. That matters most for busy sites, where DNS server outages cost real traffic and sales.
For a small site, the free DNS from your registrar or host is enough. Move to a dedicated DNS provider when uptime and lookup speed start to matter more than the cost.
DNS also affects email, security and speed
DNS does more than find websites. MX records route your email. TXT records hold the settings, such as SPF and DKIM, that help receiving mail servers trust your messages.
For security, DNSSEC adds cryptographic signatures to DNS answers so that a fake answer is easier to spot. Your registrar or DNS provider must support it. For HTTPS, the browser and the server also use an SSL certificate, which is separate from DNS. Read what an SSL certificate is.
For speed, a fast DNS provider shortens the first lookup. It only affects the start of a page load, not the time to download the page itself.
DNS security matters because attackers target the lookup
DNS was designed when the internet was small, and its answers are not signed by default. That gives attackers several ways in.
- DNS spoofing and cache poisoning: an attacker plants a false answer in a resolver’s cache so that visitors reach a malicious site instead of the real one.
- DNS hijacking: someone changes your domain’s nameservers or records without permission, often by taking over a registrar account.
- DDoS attacks on DNS servers: flooding a DNS server with traffic can cause DNS server outages, and sites that depend on it become unreachable.
- Tracking: an ordinary DNS request is sent in plain text, so a network observer can see which domains you look up.
Good DNS security practices help. Turn on DNSSEC where your registrar supports it. Use a registrar lock and two-factor sign-in. Use multiple DNS servers, so one failure does not take your site down.
Encrypted DNS, such as DNS over HTTPS and DNS over TLS, hides lookups from observers between your device and the resolver. Read our guide to website security for the wider picture.
Public DNS resolvers and private DNS serve different jobs
By default your device uses the resolver your internet service provider hands out. You can switch to a public DNS resolver. Well-known ones include Google Public DNS at 8.8.8.8, Cloudflare at 1.1.1.1 and Quad9 at 9.9.9.9. They differ in privacy policy, filtering and features, and none is best for everyone.
Private DNS means two things. On a phone it is a setting that encrypts your lookups to a resolver you choose. In a company, a private DNS server resolves internal names, such as a file server, that outsiders should never see. Public DNS answers for names anyone can reach.
Before you change your resolver, read its privacy policy. A DNS provider can see every domain you look up.
Reverse lookup turns an IP address back into a name
A normal lookup goes from name to IP address. A reverse lookup goes the other way, using a PTR record. Mail servers often run a reverse lookup on the sender’s IP address, and a mismatch can send your email to spam. If you run your own mail server, ask your provider to set the PTR record.
How to look up your own DNS records
You do not need special software. Free DNS lookup tools show a domain’s records in a browser. On your own computer, the nslookup command works on Windows, macOS and Linux, and the dig command works on macOS and Linux.
- Open a terminal or command prompt.
- Type nslookup example.com and press Enter to see the IP address.
- Type nslookup -type=MX example.com to see the mail servers.
- Compare the answers with what your host told you to enter.
A DNS propagation checker queries many servers around the world, so you can see whether your change has spread.
Common DNS problems have simple first checks
- Site not loading after a change: wait for propagation, then clear your browser and device DNS cache.
- Wrong site showing: check the A record points to the right server.
- Email bounces: check MX records and any TXT records for email authentication.
- www works but the bare domain does not: add the missing A record or a redirect.
- Nameserver changes not taking effect: confirm you changed them at the registrar, not only at the host.
If you are setting up a new site, our guide to how to install WordPress comes after your domain points to the host.
How does DNS work? The DNS lookup process in plain steps
The Domain Name System (DNS) answers one question: which server holds this site? The DNS lookup process starts at your DNS client, which is the part of your device that asks the question. It ends when a DNS server finds the corresponding IP address and sends it back.
Here is how DNS works at the resolver level. The DNS resolver receives your DNS request and checks its own memory first. A resolver’s cache holds recent DNS responses, so a popular site often resolves without leaving the resolver at all.
If the cache has no answer, the resolver sends its own resolver queries to other DNS servers. It asks a root nameserver, then the appropriate TLD server, then the authoritative DNS server for the domain. Each reply narrows the search until one server returns the specific IP address.
That chain is the whole DNS resolution process. It repeats for every new domain name your browser meets, which is why one web page can trigger many lookups for images, scripts and fonts hosted elsewhere.
Human readable domain names map to machine readable IP addresses
Human readable domain names are easy to remember and share. Machine readable IP addresses are what routers use to move data. DNS keeps the two lists in step, so a business can move its website to a new server and keep the same name.
The IP address information in a record can change without visitors noticing. Only the DNS data changes. The name on your business card stays the same.
- IPv4 addresses are four numbers separated by dots, such as 203.0.113.10.
- IPv6 addresses are longer and use letters and numbers separated by colons.
- Numeric IP addresses are what web servers and mail servers use to find each other.
A recursive DNS server, a resolver and a recursor are the same job
Guides use different names for the server that does the searching. A recursive resolver, a recursive server, a DNS recursor and recursive DNS servers all describe the server that takes your question and works through the hierarchy on your behalf. The word “recursive” means it keeps asking until it has a final answer.
An authoritative name server is different. It does not search. It only answers for the domains it holds. When people say authoritative servers, they mean the final stop in the chain, the DNS name server your domain points to.
| Server | Job | Who runs it |
|---|---|---|
| Recursive DNS resolver | Searches on your behalf and caches answers | Your internet provider or a public DNS service |
| Root server | Points to the right TLD server | Root server operators |
| TLD server | Points to the domain’s nameservers | The registry for the extension |
| Authoritative DNS | Returns the records for your domain | Your DNS provider, host or registrar |
A domain name registrar is not the same as a domain name server
A domain name registrar sells you the right to use a name for a period of time. A domain name server stores the records that say where the name points. Many people buy both from one company, but they are separate jobs, and you can split them.
This matters when you change hosts. You can keep the name at your registrar and point its nameservers at a new DNS provider. Our page on how to buy a domain name covers the registration side, and the best domain registrar compares options.
An incorrect IP address is the cause of most DNS errors
When a site does not load, the usual cause is that the DNS lookup returned an incorrect IP address, or none. Maybe the A record still points to an old server. Maybe a cached answer has not expired. Maybe the domain name server is down.
To find the correct IP address for your site, ask your host. Then compare it with what a lookup tool returns for your domain. If the two match, DNS is fine and the problem is on the web servers or in the site itself. If they differ, fix the record and wait for the TTL to expire.
Heavy DNS traffic can also slow a name server. That is one reason large sites use multiple DNS servers in different places. It is also why a managed DNS service can be worth paying for once your site depends on it.
Access to internet resources depends on DNS working first
Email, websites, apps and many internal tools reach internet resources by name. If DNS fails, those names stop resolving even though the servers themselves are running. Keeping your records tidy, your TTLs sensible and a backup copy of your zone is a cheap way to avoid a long outage.
See what a nameserver is and what web hosting is for the pieces that sit beside DNS.
What is DNS questions
What does DNS stand for?
DNS stands for Domain Name System. It is the system that matches domain names to IP addresses.
Is DNS the same as web hosting?
No. DNS tells browsers where your site lives. Web hosting is the server that stores the site’s files. You need both.
How long does DNS take to update?
Often minutes to a few hours, and sometimes up to 48 hours. The old record’s TTL controls how long other servers keep the old answer.
What is a DNS record?
A DNS record is one instruction in your domain’s DNS settings, such as an A record that points your domain to a server.
Can the internet work without DNS?
It could, but you would have to type IP addresses instead of names. DNS makes the web usable for people. Software still talks in IP addresses behind the scenes.
Which DNS records do I need for a website?
At minimum, an A record for the main domain and a CNAME or A record for www. Add MX records if you use email at your domain.
What happens if I delete my DNS records?
Your site and email stop working until you add the records back. Copy your records before you edit them.
Can I change my DNS without changing my host?
Yes. You can move your DNS to another provider and keep your hosting where it is. You change the nameservers at your registrar, then recreate your records at the new DNS provider.
How does DNS work in simple terms?
Your device asks a DNS resolver for a domain’s IP address. The resolver checks its cache, then asks the root, TLD and authoritative servers until one returns the address. Your browser then connects to it.
What is the difference between a recursive resolver and an authoritative server?
A recursive resolver searches for answers on your behalf. An authoritative server holds the real records for a domain and gives the final answer.
What is a DNS zone?
A DNS zone is the set of DNS records for a domain, stored on its authoritative nameservers.




