Teckohost earns a commission when you buy through some links on this page, at no extra cost to you. Prices were checked on November 6, 2026.
A nameserver is a server that stores the DNS records for a domain name and answers questions about where that domain lives. When someone types your address into a browser, a nameserver tells the browser which IP address to visit. Your registrar points your domain at the nameservers you choose.
This page explains what a name server does, how a DNS query reaches it, and what changes when you switch nameservers. It is part of our web hosting basics, so no technical background is assumed.
What is a nameserver? It turns a domain name into an IP address
Computers find each other by numbers called IP addresses, while a URL such as https://example.com is just the readable address a person types. People remember human readable domain names such as example.com. The Domain Name System (DNS) is the phone book that connects the two, and nameservers are the servers that hold the pages of that phone book.
Each nameserver holds a set of DNS records for the domains it is responsible for. One record might say that example.com lives at a certain IP address. Another might say where its email is handled. The nameserver does not host your website.
It only knows where the website is, and your web hosting account is the place that actually serves the pages. This DNS system is configured once and then runs quietly in the background.
If you want the bigger picture first, read what DNS is, then come back here for the nameserver piece.
A DNS server answers each DNS query for your domain
A nameserver answers a DNS query. The visitor typically never talks to it directly, and the query name is simply the domain being looked up. A helper called a DNS resolver does the asking on the visitor’s behalf, usually run by their internet service provider or a public DNS service.
Here is the usual path of a DNS request, in plain steps:
- The visitor types your domain into their web browser.
- The browser, through the stub resolver built into the device, asks the recursive resolver for the IP address.
- If the resolver has a fresh answer in its DNS caching, it replies at once and the lookup ends.
- If not, the resolver asks a root server which servers handle the top level domain, such as .com.
- The top level domain servers reply with the authoritative name servers for your domain.
- The resolver asks one of those authoritative servers for your record and gets the IP address.
- The browser connects to that IP address and loads the page.
This is a recursive query from the resolver’s point of view, because it does the legwork until it finds the answer. Each step toward the authoritative server is a non recursive query, because the server only replies with what it knows or points to the next server.
The domain namespace is a tree, and every level has a nameserver
The domain namespace works like an upside down tree. At the top sit the root servers. Below them are the top level domain servers for .com, .org and the rest. Below those are the authoritative servers for each domain, such as yours. Every level only needs to know the level beneath it.
This design keeps the system fast. No single DNS server has to know every internet resource. A server simply knows who to ask next. Each given domain has its own zone, and the nameservers responsible for that zone are the final authority on its records.
A subdomain such as shop.example.com can live in the same zone, or you can hand it to other DNS servers by adding NS records for it. That is how large companies split a name between teams.
The three kinds of DNS query and how DNS resolution works
A DNS client, such as your phone, rarely asks a nameserver directly. It sends a request to a resolver, and the resolver chooses how to find the answer. Three query types describe that conversation.
| Query type | How it works |
|---|---|
| Recursive query | The client asks the resolver to return a final answer or an error, and the resolver does all the work |
| Iterative query | The resolver asks a server, which replies with the best answer it has or a referral to another server |
| Non recursive query | The server already knows the answer, from its own records or its cache, and replies without asking anyone else |
DNS resolution ends when a resolver reaches the servers responsible for the domain. Those servers directly return the record, so the answer is not guessed. All this DNS traffic is small and fast, and on a local network a router often passes it on to your provider.
Authoritative servers normally answer only for their own zones. They do not go out looking for answers about other domains. That is the resolver’s job.
DNS caching is why changes take time to show
Resolvers, browsers and operating systems all keep recent answers for the length of the TTL. This DNS caching saves a great deal of traffic. A popular site would otherwise hit its nameservers on every page view.
The downside is delay. If you change an IP address, any resolver holding the old answer keeps serving it until the cache expires. That is why a DNS change appears at different times for different people, and why lowering the TTL before a planned move helps.
You can clear your own browser and device cache to see the new answer sooner. You cannot clear a resolver run by someone else.
Authoritative name servers hold the real answer, and a DNS resolver only remembers it
People often mix up two kinds of DNS server. They do different jobs, and only one of them is the nameserver you set up for your domain.
| Type | Job | Who controls it |
|---|---|---|
| Authoritative DNS server | Stores the official DNS records for your domain and answers with them | You, through your registrar or DNS provider |
| Recursive resolver | Looks up answers for users and keeps them for a while | The visitor’s internet provider or a public DNS service |
| Root servers | Point resolvers to the servers for each top level domain | Run for the whole internet |
An authoritative DNS server is the one that gives the official reply. When this page says nameserver, it means the authoritative kind, also called a DNS name server. Those are the authoritative nameservers listed for your domain, and they are the ones you can change.
Your DNS records live on the nameservers you choose
The nameservers do not matter much on their own. What matters is the set of DNS records stored on them. Whoever runs your nameservers is where you edit those records.
| Record type | What it does |
|---|---|
| A record | Points a domain or subdomain to an IPv4 address |
| AAAA record | Points a domain or subdomain to an IPv6 address |
| CNAME records | Make one name an alias of another name |
| MX record | Tells the internet which servers receive your email |
| TXT record | Holds text such as domain verification and email authentication |
| NS records | List the nameservers that are responsible for the domain |
Each record also carries a time to live, or TTL. It tells resolvers how long they may keep the answer before asking again. A short TTL means changes show up sooner. A long one reduces load on the nameserver.
Nameservers and DNS are not the same thing
DNS is the whole system. A nameserver is one part of it. A common question is the difference between DNS and nameservers: DNS is the set of rules and servers that translate names, while nameservers are the specific servers that hold your domain’s records.
A DNS provider is the company that runs those servers. It may be your registrar, your web host or a specialist such as Cloudflare. Pick one place to manage records, so you are never editing a zone that nobody reads.
Where your nameservers come from
When you register a domain, the registrar sets default nameservers. These usually serve a basic DNS zone you can edit in the registrar’s dashboard. A domain registrar handles domain registration, and a domain name registrar is simply the full name for the company that sells you the domain.
You log in there to get access to the nameserver settings. The domain registries behind it keep the master list of which nameservers belong to which domain.
Your web host also runs nameservers. Many hosts give you two or more addresses, such as ns1.yourhost.com and ns2.yourhost.com. You can use third party nameservers instead, for example from a DNS provider you prefer.
If you still need a domain, our guides on how to buy a domain name and the best domain registrar cover the buying side, and Namecheap is one registrar you can compare.
Default nameservers or host nameservers: pick one place to edit
You have two common setups. In the first, you keep the registrar’s nameservers and add records there that point to your host. In the second, you change the nameservers at the registrar to your host’s, and manage records in the host’s panel.
| Setup | Where you edit records | When it fits |
|---|---|---|
| Registrar nameservers | Registrar dashboard | You want DNS separate from hosting, or you may move hosts later |
| Host nameservers | Hosting control panel | You want one dashboard and your host manages the setup |
| DNS provider nameservers | The DNS provider’s dashboard | You use a service such as Cloudflare in front of your site |
Only one set of authoritative nameservers is active for a domain at a time. Records you add in a place that is not the active one are ignored.
How to change nameservers without taking your site down
Changing nameservers is routine, but it deserves care. The change tells the world to ask a different server for your records. If the new server does not have the right records, your site and email can break.
- Copy every record from the current DNS zone, including MX and TXT records.
- Recreate those records at the new provider before you switch.
- Lower the TTL a day or two ahead if you can.
- Log in to your registrar and open the domain’s nameserver settings.
- Replace the old nameservers with the new ones, then save.
- Check the domain from a few places and confirm the site and email still work.
The change is not instant. Resolvers keep old answers until the time to live runs out, so some visitors see the old setup for a while. Registry updates for the nameserver change itself can also take time. Plan the switch for a quiet hour, and keep the old zone intact until everything works.
If you are moving a whole site, follow our website migration checklist and the guide to transferring a website to a new host, so DNS is the last step and not the first.
Fixing a DNS problem usually starts with the nameservers
When a site will not load, check the basics in order. Confirm the domain has not expired at the registrar. Confirm the nameservers listed there are the ones you meant to use. Then check that the DNS records on those servers are correct.
A few common faults:
- The domain still points to old nameservers after a move.
- Records were added to a DNS provider that is not the active one.
- A typo in an NS record, or a missing A record for the www name.
- A cached answer on your device. Try another network or a public DNS service.
Public resolvers such as 1.1.1.1 and 8.8.8.8 are DNS servers you can point your device at. They are resolvers, not your domain’s nameservers, and neither is the best nameserver for everyone. Speed depends on where you are.
How to find out which nameservers a domain uses
You can check the nameservers of any domain in a minute. A WHOIS or domain lookup tool lists them. An NS lookup tool shows the NS records the internet currently sees. On a computer you can also use a command line tool such as nslookup or dig, which are built into most systems.
Your registrar’s dashboard shows what you have set. A lookup shows what the rest of the internet sees. If the two disagree, a recent change has probably not finished spreading.
Nameserver questions people ask
Is changing nameservers risky?
It is low risk when the new provider already holds correct records. The risk comes from switching first and copying records later, which can break email and the website for a few hours.
Will changing nameservers affect my emails?
It can, if the MX records are not copied to the new nameserver. Recreate every MX and TXT record before the switch, and email keeps flowing.
What is the purpose of a nameserver?
Its purpose is to answer DNS queries for a domain with the right IP address and records, so browsers and email servers can find your site and mailboxes.
What is an example of a name server?
A typical one looks like ns1.example-host.com. Cloudflare assigns each account a pair of nameservers ending in ns.cloudflare.com. Your registrar or host shows yours in its dashboard.
What is the difference between DNS and nameservers?
DNS is the whole system that translates names to addresses. Nameservers are the servers inside that system that store your domain’s records.
How long does a nameserver change take?
Often minutes to a few hours, sometimes up to a day or two, because resolvers cache old answers. The exact time depends on the TTL values and your registrar.
New to all of this? Start with what web hosting is, then see which provider suits you in our best web hosting list.




