Nameserver (also written as name server or NS) is the server responsible for holding and serving the DNS records for your domain. When someone visits your website or sends an email to your domain, their device queries a nameserver to find out where to route that request.
Every registered domain has at least two nameservers assigned to it (primary and secondary, for redundancy). These are set in your domain registrar’s control panel and stored in the registry’s database.
How nameservers work in practice
The resolution chain when someone types yoursite.com in their browser:
- Browser checks local DNS cache if not found, asks the ISP’s DNS resolver
- ISP resolver asks the root DNS servers: “Who handles .com?”
- Root servers direct to Verisign’s .com TLD nameservers
- Verisign’s servers say: “For yoursite.com, ask these nameservers: ns1.yourhost.com, ns2.yourhost.com”
- The hosting provider’s nameservers return the A record (IP address) for yoursite.com
- Browser connects to that IP address and loads the site
The nameservers in step 4 are what you set in your registrar’s control panel.
Default vs custom nameservers
Registrar’s default nameservers: When you register a domain, the registrar automatically assigns their own nameservers. If you’re using the registrar for hosting or DNS management, this is fine you manage records in the registrar’s control panel.
Custom nameservers (pointing to hosting provider): Most hosting providers ask you to change your nameservers to theirs when setting up hosting. This points DNS authority to the hosting provider. You then manage DNS records (A records, CNAME records, MX records) in your hosting provider’s control panel rather than your registrar’s.
Cloudflare nameservers: A common setup is registering at Namecheap (or any registrar), then pointing nameservers to Cloudflare (ns1.cloudflare.com, ns2.cloudflare.com). All DNS management happens in Cloudflare’s dashboard, which provides faster propagation, DDoS protection, and better control.
What nameserver records look like
Standard nameserver entries:
ns1.registrar.com
ns2.registrar.com
Or for Cloudflare:
ns1.cloudflare.com
ns2.cloudflare.com
The nameservers are set at the registrar this is a field in your domain’s settings called “Nameservers” or “NS records.” Changing these takes 24–48 hours to propagate globally (see: DNS propagation).
Nameserver change vs individual DNS record change
| Change type | What changes | Propagation time |
|---|---|---|
| Nameserver change | Authority for all DNS moved to new provider | 24–48 hours |
| A record change (within same NS) | IP address for the domain | 1–4 hours (TTL-dependent) |
| MX record change (within same NS) | Email routing | 1–4 hours (TTL-dependent) |
Changing nameservers is slower than changing individual DNS records because the registry’s record of which nameservers to use has its own propagation cycle. Changing a single A record within an existing nameserver system is faster the nameservers are already known, only the record value changes.
Keeping registrar and nameservers separate
A common recommendation for professionals: register domains at a budget-friendly registrar (Porkbun, Namecheap, or Cloudflare Registrar) and use Cloudflare for nameservers and DNS management. This separates the two concerns your domain registration is independent of your DNS management and gives you Cloudflare’s speed, security, and analytics without paying Cloudflare’s (at-cost) registration prices for every renewal.
See also: DNS propagation · TTL · Registrar vs registry