Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Learn

NS records and nameservers: what they are and how to change them

An NS (name server) record names the servers that are authoritative for a domain DNS zone. You change nameservers at your registrar, which publishes them to the TLD registry, and the new DNS host starts answering once resolvers refresh their cached delegation.

The short answer
  • NS records say who answers DNS for the domain. Records in any other zone are ignored.
  • Nameservers are set at the registrar, even if DNS is hosted somewhere else.
  • Copy the zone to the new host first, then switch, so there is no gap in service.
Try the nameserver lookupFree, live, no signup

Registrar, DNS host, web host: who does what?

Three separate roles that are often bundled
RoleWhat it controlsWhere you change it
RegistrarDomain registration, renewal, lock and which nameservers the domain delegates toRegistrar account
DNS host (nameservers)The zone: A, MX, TXT, CNAME and other recordsDNS provider panel; may be the registrar or a third party
Web hostThe server that serves the website and its IP addressHosting panel; you copy its IP into an A record

What do NS records look like?

nslookup -type=NS example.com (output observed 2026-11-21)
example.com  nameserver = elliott.ns.cloudflare.com
example.com  nameserver = hera.ns.cloudflare.com
; zone file form
example.com.  86400  IN  NS  ns1.dnshost.example.
example.com.  86400  IN  NS  ns2.dnshost.example.

How do you change nameservers?

  1. 01

    Rebuild the zone at the new host

    Add every record you need (A, AAAA, CNAME, MX, TXT) to the new DNS provider before changing anything. Export the old zone if the old host allows it.

  2. 02

    Turn off DNSSEC if it is on

    Cloudflare documents that changing nameservers with DNSSEC active can make the domain unreachable. Remove the DS record at the registrar first, then re-enable DNSSEC at the new host.

  3. 03

    Open the registrar nameserver setting

    At Namecheap, for example: Domain List, Manage, Nameservers, choose Custom DNS and enter the new names. Other registrars use similar menus under DNS or Nameservers.

  4. 04

    Enter exactly the names the new host gave you

    Usually two to four hostnames. Remove the old ones so only the new set remains.

  5. 05

    Verify with the nameserver lookup

    Use the nameserver lookup or nslookup -type=NS example.com 1.1.1.1. Allow up to 24 hours; see DNS propagation.

Nameserver changes are the riskiest DNS edit

Whoever controls the nameservers controls every record. An unexpected change can be a hijack. Aepto Theft Guard alerts on unexpected nameserver and registrar changes against a learned baseline. See what happens when someone changes your DNS.

What do you check before and after a nameserver change?

  • The new DNS host has every record, including MX, TXT and subdomain records
  • DNSSEC is disabled, and the old DS record is removed at the registrar
  • The registrar domain lock does not block nameserver edits (lock normally blocks transfers, not DNS changes)
  • The names you enter match the new provider instructions exactly
  • The nameserver lookup shows the new set from at least two resolvers
  • The site, email and any API endpoints work from outside your network

What are glue records and custom nameservers?

Vanity nameservers

If your nameservers are inside your own domain, such as ns1.example.com for example.com, the registry needs address records for them, called glue, registered at the registrar.

Subdomain delegation

Add NS records for a subdomain inside the parent zone to hand that subdomain to different nameservers.

Registrar versus zone NS

The NS records you set at the registrar are the ones the registry publishes. The NS records inside your zone should match them.

Common questions

What is an NS record?

An NS record lists a nameserver that is authoritative for a zone. The records at the registry delegate your domain to those servers, and the NS records inside the zone repeat the same information.

What is the difference between a nameserver and a registrar?

The registrar is the company where you registered and renew the domain. Nameservers are the DNS servers the domain delegates to. You can register at one company and host DNS at another.

How long does a nameserver change take?

Namecheap says up to 24 hours, sometimes more, to reach ISP caches. Cloudflare also tells users to allow up to 24 hours. Many changes show up within an hour or two.

Can an NS record point to a CNAME?

No. RFC 2181 section 10.3 says the target of an NS record must be a name with address records, not an alias. Use A and AAAA records for nameserver hostnames.

Get alerted on nameserver changes

Theft Guard compares nameservers and registrar against a learned baseline and alerts on unexpected changes.