Back to Domains Glossary

What is a Nameserver?

A nameserver is a server that answers Domain Name System (DNS) queries about domain names. Authoritative nameservers publish a domain’s official DNS records, from IP addresses to mail routes; recursive resolvers fetch those answers for users. The nameserver settings at your registrar choose the authoritative servers for your domain.

More About Nameservers

Nameservers store and serve the DNS records for domain names. Their best-known job is matching a domain name to an IP address, so visitors don’t have to memorize a string of numbers to reach a website. When you type a domain name into your browser, your computer sends a query to a DNS resolver, which tracks down the domain’s authoritative nameserver. That nameserver answers with the IP address of the server hosting the site, and the browser connects. Which nameservers answer for your domain is set at your registrar, and that choice decides who controls your DNS.

How a nameserver lookup works

The lookup runs through a chain of servers, and the whole trip takes a fraction of a second. Here’s what happens when you visit example.com:

Flow diagram of a DNS lookup: the browser asks a resolver, which queries the root servers, then the TLD nameservers, then the domain's authoritative nameserver, which returns the site's IP address so the browser can connect. It shows that each hop only points to the next server, and only the authoritative nameserver gives the final answer.
  1. Your browser asks a DNS resolver for the site’s IP address. The resolver is usually run by your internet provider, though public ones like 1.1.1.1 exist too.
  2. The resolver queries the root servers, which point it to the nameservers for the domain’s ending, such as .com (the TLD nameservers).
  3. The TLD nameservers point it to the domain’s own authoritative nameservers, such as ns1.dreamhost.com. These are the ones set at the registrar.
  4. The authoritative nameserver answers with the site’s IP address, say 12.34.56.78, and your browser connects to that server.

Resolvers cache each answer for a set time, so repeat lookups skip most of the chain. That cache is also why nameserver changes take time to spread.

Nameserver vs. DNS vs. DNS records

The three terms describe different layers of the same machinery:

  • DNS is the system: a distributed directory that stores and returns records about domain names, covering website addresses, mail routing, aliases, and verification data.
  • A nameserver is a server inside that system. It holds the records for specific domains and answers queries about them.
  • DNS records are the individual entries a nameserver serves. The A record holds a domain’s IP address, the MX record routes its email, and the NS record names its nameservers.

For a walkthrough of the whole system, read our guide to nameservers vs. DNS.

How to find a domain’s nameservers

Run a WHOIS lookup on the domain: the report lists its current nameservers. You can also check the DNS or domains panel in your registrar or hosting account, or run dig ns example.com from a terminal.

All domains managed by DreamHost use the same 3 nameservers: ns1.dreamhost.com, ns2.dreamhost.com, and ns3.dreamhost.com. That naming pattern, ns plus a number followed by the company’s domain, is a quick way to recognize which provider runs a domain’s DNS.

Changing nameservers vs. editing DNS records

These are different operations. Changing nameservers hands control of all the domain’s DNS to a new provider, and it happens at the domain registrar that manages the domain’s registration, which may not be your host. Editing DNS records changes one entry, such as an A record or CNAME record, and happens at whichever provider runs your nameservers.

When you migrate to a new host, you have two options: switch the domain to the new host’s nameservers, or keep your current DNS provider and update the A record to the new server’s IP address. Change nameservers when you want the new provider to manage everything. Edit individual records when you only need to repoint one service, such as routing traffic through a web application firewall (WAF) or CDN, while everything else stays put.

To change nameservers, log in at the registrar and replace the existing nameserver entries with the new provider’s. To point a domain at DreamHost, enter ns1.dreamhost.com, ns2.dreamhost.com, and ns3.dreamhost.com.

What to expect after a nameserver change

For a .com domain, plan for up to 48 hours. The .com TLD servers hand out nameserver records with a 2-day (172,800-second) cache lifetime, so a resolver that recently looked up your domain can keep serving the old answer until that timer runs out. Other TLD registries set their own cache times, so budget a similar window. Until propagation finishes, some visitors still reach the old server, so keep the old hosting live through the switch.

The classic mistake: custom DNS records don’t follow a nameserver change. The new provider’s nameservers only serve the records that exist there, so MX records for email, subdomain CNAMEs, and verification TXT records disappear from view the moment the switch takes effect. Recreate them at the new DNS provider before you change nameservers, or your email and subdomains will break.

Frequently Asked Questions

Not exactly. Nameserver usually means an authoritative DNS server, the one publishing a domain’s official records. Resolvers, like the ones your internet provider runs, are DNS servers too, but they only fetch and cache answers. Only authoritative nameservers appear in your domain settings.
At least 2. The DNS standard, RFC 1034, requires every zone to be available on at least 2 servers, so the domain still resolves if one fails. Many providers assign more; DreamHost assigns 3.
Yes. Your registrar, your web host, or a third-party DNS provider like Cloudflare can run your nameservers. Whoever runs them controls the domain’s DNS records, so you manage records there. Your site stays on your host either way; the nameservers just give directions to it.
No. A nameserver change only affects which servers answer DNS queries for the domain. Your files stay on your web host, and your mailboxes stay with your email provider; only the directions pointing to them change.
Special Offer

Domain Registration

Search for the perfect domain name and register yours before someone else does! Click below to check availability and see special offers.

Domain Names