# Nameservers explained: what they are and how to change them

> What nameservers do, how they differ from DNS records, when to use your host's nameservers or another provider's and how to switch without downtime.

Source: https://comparehostingonline.com/guides/nameservers-explained/

## Short answer

Nameservers are the servers that hold your domain's DNS records. Your registrar tells the internet which nameservers to ask. Change them when you want a different provider, such as your host or Cloudflare, to manage your DNS, and copy your records to the new provider first so nothing breaks.

Last verified Nov 28, 2026 · [How we test](https://comparehostingonline.com/methodology/)

At a glance

-   **What is a nameserver?** A nameserver is a server that answers DNS questions for a domain.
-   **What is the difference between nameservers and DNS records?** Think of nameservers as the filing cabinet and DNS records as the papers inside.
-   **Whose nameservers should you use?** There is no universally right answer.

## What is a nameserver?

A nameserver is a server that answers DNS questions for a domain. Each domain lists at least two of them, usually named like ns1.example.net and ns2.example.net, so that one can fail without taking the domain down. They are called authoritative because their answers are the official ones; other resolvers cache those answers but do not own them.

The list of nameservers is stored at the registry for the extension (for .com, that is Verisign) and you change it through your registrar. The records themselves, such as the A record for your site or the MX record for your email, live at the nameservers.

## What is the difference between nameservers and DNS records?

Think of nameservers as the filing cabinet and DNS records as the papers inside. Changing nameservers means pointing the world at a different cabinet. If the new cabinet is empty, the domain stops working until you add the records. That is the single most common cause of downtime during a DNS change.

## Whose nameservers should you use?

There is no universally right answer. If you have one site on one host and you do not plan to move, using the host’s nameservers is fine. If you expect to move hosts, or use several services on one domain, keeping DNS at the registrar or a dedicated provider makes changes safer because DNS never has to move.

| Option | Good for | Watch out for |
| --- | --- | --- |
| Your host’s nameservers | Simplicity: site and email records are created for you | DNS is tied to the host; moving hosts means moving DNS too |
| Your registrar’s nameservers | Keeping DNS separate from hosting, with one login | Features can be basic; confirm you can add all record types |
| A dedicated DNS provider such as Cloudflare | Speed, a CDN and security features, plus DNS independent of any host | Another account to manage and a proxy setting to understand |

## How do you change nameservers without downtime?

Registries typically refresh the nameserver list within minutes, but resolvers that cached the old list can keep using it until its TTL ends, which for the delegation itself is often up to 48 hours. During that window some visitors reach the old nameservers and some the new ones, which is why both must return the same records.

1.  1
    
    **Recreate every record**
    
    At the new DNS provider, add the same A, AAAA, CNAME, MX and TXT records first.
    
2.  2
    
    **Lower the TTL**
    
    A day ahead, set short TTLs at the current provider so caches expire quickly.
    
3.  3
    
    **Switch at the registrar**
    
    Replace the old nameservers with the new ones in your registrar account.
    
4.  4
    
    **Verify and wait**
    
    Check with a lookup tool. Keep the old zone intact for a few days.
    

## What can go wrong?

-   Email stops because MX or TXT records were not copied.
-   Subdomains disappear because only the main records were recreated.
-   DNSSEC is enabled at the registrar but not at the new provider, which makes the domain fail validation. Turn DNSSEC off before the switch and back on afterwards, or follow your provider’s migration guide.
-   The wrong nameservers were pasted, or a typo broke the name.
-   A proxy setting hides your real server address, which can confuse tools that expect to see it.

## How can you check which nameservers a domain uses?

Look up the NS records with a DNS tool. Our DNS lookup shows the nameservers a resolver returns, which also helps you identify a site’s DNS provider and often its host. If your lookup shows nameservers you did not set, check your registrar account first, then look for any DNS or hosting company that may have changed them.

## How do nameservers relate to your web host?

A web host is the server that holds your site files. Nameservers only tell the internet where to find it. Many hosts bundle a DNS service, so people think the two are the same, but they are separate jobs. You can run your site at one company, keep DNS at another and register the domain at a third. That separation is a strength: you can replace one part without touching the others.

It also explains why a switch of hosting does not always require a nameserver change. If you keep DNS where it is, you edit the A record to the new server’s address and you are done. See [how to point a domain to your hosting](https://comparehostingonline.com/guides/point-domain-to-hosting/) for both routes.

## What is a vanity or private nameserver?

Reseller and agency plans sometimes let you use nameservers on your own domain, such as ns1.youragency.com, which you point to the host’s servers. Clients then use your name instead of the host’s. It is a branding choice, not a technical advantage, and it needs glue records at the registrar so the nameservers can be found. If you use [reseller hosting](https://comparehostingonline.com/hosting-types/reseller/), ask the provider whether it supports private nameservers and how to set them up.

## How long should you wait before you decide something is broken?

Registries often publish a nameserver change within minutes. The resolvers that cached the old delegation can take longer, with a cap that is commonly 48 hours because that is the TTL for the delegation in the .com zone. In practice most visitors see the change within a few hours. If a site is still down after 48 hours, the fault is nearly always the records at the new provider, not the delay.

Use the waiting time well. Test the new setup by editing your computer’s hosts file or by using the host’s temporary URL, so you can confirm the site works before the world moves. The [website migration checklist](https://comparehostingonline.com/guides/website-migration-checklist/) lists the steps to run in parallel.

## Do nameservers affect speed or security?

A fast, well-run DNS provider shaves a few milliseconds off the first lookup for a visitor and is more resilient under attack. Large DNS services use anycast, which answers from the closest of many locations. Security features such as DNSSEC and a built-in [web application firewall](https://comparehostingonline.com/guides/what-is-a-web-application-firewall/) or [DDoS protection](https://comparehostingonline.com/guides/what-is-ddos-protection/) usually come with a dedicated provider such as Cloudflare, covered in [do you need Cloudflare?](https://comparehostingonline.com/guides/do-you-need-cloudflare/). For a small site the difference is minor; for a busy or targeted site it can matter.

## What are glue records?

If a domain uses nameservers inside the same domain, such as ns1.example.com for example.com, resolvers face a chicken-and-egg problem: to find ns1.example.com they would have to ask example.com’s nameservers. Glue records solve it by publishing the IP address of those nameservers at the parent registry. You set glue at your registrar when you create private nameservers. Most people never need them, but reseller and agency setups with branded nameservers do; see [reseller hosting](https://comparehostingonline.com/hosting-types/reseller/).

## Sources and further reading

-   [RFC 1034: Domain names, concepts and facilities](https://www.rfc-editor.org/rfc/rfc1034)
-   [MDN: What is a domain name?](https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_domain_name)
-   [Cloudflare DNS documentation](https://developers.cloudflare.com/dns/)
-   [ICANN: Transfer policy](https://www.icann.org/resources/pages/transfer-policy-2016-06-01-en)

## Common questions

What is a nameserver?

A nameserver is a server that holds the DNS records for a domain and answers questions about it. Each domain lists at least two so that one can fail without taking the domain down. Your registrar stores the list the world uses to find them.

How long does a nameserver change take?

The registry usually updates within minutes, but resolvers that cached the old delegation can keep using it for up to about 48 hours. Most people see the change within a few hours. Keep the old records in place during that window.

Will changing nameservers break my email?

It can. The new nameservers answer for the whole domain, so if the MX and TXT records are missing there, mail stops. Recreate every record at the new provider before you switch, then check email after the change.

Should I use my host's nameservers or Cloudflare's?

Your host's nameservers are the simplest option for one site. A dedicated provider such as Cloudflare adds speed and security features and keeps DNS independent of the host. If you expect to change hosts, independent DNS makes moves safer.

How can I tell which nameservers my domain uses?

Look up its NS records with a DNS tool. Our lookup lists them. You can also check the domain settings in your registrar account. If they differ from what you expect, find out who changed them before you edit anything.

## Related

[What is DNS?](https://comparehostingonline.com/guides/what-is-dns/) [What are DNS records?](https://comparehostingonline.com/guides/what-are-dns-records/) [DNS lookup tool](https://comparehostingonline.com/tools/dns-lookup/) [Point a domain to hosting](https://comparehostingonline.com/guides/point-domain-to-hosting/)

## More guides

[What is an SSL certificate? How HTTPS works and what to check](https://comparehostingonline.com/guides/what-is-an-ssl-certificate/) [How to choose web hosting: a step-by-step guide](https://comparehostingonline.com/guides/how-to-choose-web-hosting/) [How much does web hosting cost? Prices by type and what changes them](https://comparehostingonline.com/guides/how-much-does-web-hosting-cost/) [CDN service explained: what it does, free options and how to choose one](https://comparehostingonline.com/guides/what-is-a-cdn/) [Website backups: what to back up, how often and how to test a restore](https://comparehostingonline.com/guides/website-backups-guide/)

MH

**[Muhammad Hamza](https://comparehostingonline.com/team/muhammad-hamza/)** Founder & Editor

Writes and signs off every comparison, and runs the compliance reviews. Has worked on SOC 2 and HIPAA compliance programs for companies.

Our [editorial policy](https://comparehostingonline.com/editorial-policy/) and [testing method](https://comparehostingonline.com/methodology/) are public.
