Skip to main content
Back to Category

Nameserver Change: Domain DNS Transfer Guide

What are nameservers, how to change NS at your registrar, propagation time, checking with whois/dig, and common registrar interfaces guide.

Read time: 11 min Network & DNS
nameserverns changedns transferdomain managementwhoisdns propagationregistrardns server

Table of Contents

Nameserver Change: Domain DNS Transfer Guide

Changing nameservers (NS) allows you to move your domain's DNS management from one provider to another. This is required when switching to Cloudflare, using a custom DNS server, or changing hosting providers. In this guide, you'll learn what nameservers are, how to change them, and how to monitor the process.

What is a Nameserver?

A nameserver (NS) is the authoritative DNS server that answers DNS queries for a domain. At least two nameservers must be defined for each domain (primary and backup).

hljs bash
# Query current nameservers
dig example.com NS +short
# Example output:
# ns1.cloudflare.com.
# ns2.cloudflare.com.

# Check with whois
whois example.com | grep -i nameserver

Nameserver Hierarchy

Root DNS Servers (.)
    ↓
TLD Servers (.com, .net, .org)
    ↓
Authoritative Nameservers (ns1.example.com)
    ↓
Domain Records (A, CNAME, MX...)

When a user accesses example.com:

  1. The browser asks root DNS servers
  2. Root server directs to TLD server
  3. TLD server directs to authoritative NS
  4. Authoritative NS returns the IP address

When is a Nameserver Change Required?

  • Switching to Cloudflare: For CDN and DDoS protection
  • Changing hosting: To use the new hosting provider's NS
  • Custom DNS server: To set up your own DNS infrastructure
  • DNS management panel change: For better interface or features
  • Domain transfer: When moving a domain to another registrar

Nameserver Change Steps

1. Get New Nameserver Information

Obtain nameserver addresses from your new DNS provider. Examples:

# Cloudflare
ns1.cloudflare.com
ns2.cloudflare.com

# Google Cloud DNS
ns-cloud-a1.googledomains.com
ns-cloud-a2.googledomains.com

# AWS Route 53
ns-1234.awsdns-12.com
ns-5678.awsdns-34.net
ns-9012.awsdns-56.org
ns-3456.awsdns-78.co.uk

2. Back Up Current DNS Records

Note all DNS records before changing nameservers:

hljs bash
# List all DNS records
dig example.com ANY

# Check important records separately
dig example.com A
dig example.com AAAA
dig example.com MX
dig example.com TXT
dig example.com CNAME

Before changing nameservers, transfer all DNS records to the new DNS provider. Otherwise, email, website, and other services may stop working.

3. Create Records at New DNS Provider

Create all records at the new DNS provider before changing nameservers:

# Records to create in new DNS panel:
@     A      203.0.113.50
www   A      203.0.113.50
mail  A      203.0.113.50
@     MX 10  mail.example.com.
@     TXT    "v=spf1 ip4:203.0.113.50 ~all"

4. Change Nameservers at Registrar

Namecheap

  1. Log in to your Namecheap account
  2. Domain List → Click on domain name → Manage
  3. In the Nameservers section, select Custom DNS
  4. Enter the new nameserver addresses
  5. Click Save

GoDaddy

  1. Log in to your GoDaddy account
  2. My ProductsDomains → Click on domain name
  3. Go to the DNS tab
  4. Click Change in the Nameservers section
  5. Select Enter my own nameservers
  6. Enter nameserver addresses and save

Cloudflare (as registrar)

  1. Log in to Cloudflare dashboard
  2. Select your domain
  3. Go to DNSRecords
  4. Cloudflare automatically scans existing DNS records
  5. Add missing records manually

Propagation Time and Monitoring

Propagation Time

Nameserver changes can take longer than regular DNS changes:

  • Minimum: 1-2 hours
  • Average: 12-24 hours
  • Maximum: 48-72 hours

This depends on the TTL value of the old nameservers and ISP cache policies.

Monitoring with dig

hljs bash
# Check nameserver change
dig example.com NS +short

# Check from specific DNS servers
dig @8.8.8.8 example.com NS +short
dig @1.1.1.1 example.com NS +short
dig @9.9.9.9 example.com NS +short

# Find authoritative NS
dig example.com NS +authority

# Check propagation status
for dns in 8.8.8.8 1.1.1.1 9.9.9.9 208.67.222.222; do
  echo -n "$dns: "
  dig @$dns example.com NS +short
done

Monitoring with whois

hljs bash
# whois query
whois example.com

# Filter nameserver lines
whois example.com | grep -i "name server\|nameserver\|nserver"

Online Tools

  • whatsmydns.net: Shows NS propagation worldwide
  • dnschecker.org: NS check from different locations
  • intodns.com: DNS configuration analysis
  • mxtoolbox.com: NS and DNS health check

Post-Change Checks

hljs bash
# 1. Verify nameservers are updated
dig example.com NS +short

# 2. Check A record resolves
dig example.com A +short

# 3. Check MX record
dig example.com MX +short

# 4. Test website access
curl -I https://example.com

# 5. Verify email MX record
dig example.com MX
nslookup -type=MX example.com

Common Issues

Issue 1: Nameserver Change Not Propagating

hljs bash
# Check old NS TTL value
dig example.com NS
# Wait for the TTL value

# Query TLD server directly
dig @a.gtld-servers.net example.com NS

Issue 2: Website Not Working

A record may be missing at new DNS provider:

hljs bash
# Check A record via new NS
dig @ns1.newdns.com example.com A

Issue 3: Email Not Working

MX record may not have been transferred to new DNS provider:

hljs bash
# Check MX record
dig @ns1.newdns.com example.com MX

Issue 4: SSL Certificate Error

When switching to Cloudflare, SSL mode may be incorrectly set. Check Cloudflare SSL/TLS settings.

Special Notes for Switching to Cloudflare

hljs bash
# 1. Add domain in Cloudflare
# 2. Cloudflare automatically scans existing DNS records
# 3. Manually add missing records
# 4. Enter Cloudflare's NS addresses at your registrar

# Verify Cloudflare NS
dig example.com NS +short
# Expected: ns1.cloudflare.com, ns2.cloudflare.com

During nameserver changes, don't delete records at the old DNS provider. Keep records active at both providers until propagation is complete. You can remove old records after propagation is done.

Conclusion

Changing nameservers is the primary way to move domain DNS management. Back up your DNS records before the change, create records at the new provider, then make the NS change at your registrar. Monitor the propagation process with dig and whois tools. Be patient — full propagation can take 24-48 hours.