DNSFly
Guide 7 min read

How to Change DNS Nameservers

Changing nameservers is one of the first things you do when moving to a new hosting provider or DNS service. Here is how to do it correctly without breaking your site or email.

Quick Answer

To change nameservers: log in to your domain registrar (where you bought the domain), find the nameserver or DNS settings, replace the existing nameservers with the new ones from your hosting or DNS provider, and save. Changes take 1 to 24 hours to propagate globally. Before switching, back up your current DNS records (especially MX and TXT records) and recreate them on the new provider.

1. When Do You Need to Change Nameservers?

Nameservers control who manages your domain's DNS records. When you change them, you are handing DNS control from one provider to another. This is different from updating a single DNS record like an A record or CNAME.

Common reasons to change nameservers:

ScenarioWhat to Change
Moving to a new web hostNameservers (to the new host's NS)
Switching to Cloudflare, Route 53, or another DNS serviceNameservers (to the DNS provider's NS)
Pointing your website to a new server IPA record only (keep existing nameservers)
Setting up a CDN or WAF (like Cloudflare)Nameservers (Cloudflare requires this for full setup)
Adding email service without changing hostingMX records only (keep existing nameservers)

The key distinction: if you only need to change where your website or email points, update the specific DNS record. If you need to move all DNS management to a new provider, change the nameservers.

2. Before You Change: Preparation Checklist

Skipping preparation is the most common cause of downtime during nameserver changes. Take 10 minutes to do these steps before touching anything.

Back up your current DNS records

Log in to your current DNS provider and screenshot or copy all existing records: A, AAAA, CNAME, MX, TXT, NS, and any others. You will need to recreate these on the new provider.

Recreate records on the new provider first

Set up all your DNS records on the new nameserver provider before making the switch. This way, when traffic starts arriving at the new nameservers, the records are already in place.

Pay special attention to email records

MX records, SPF, DKIM, and DMARC records must all be copied. Missing any of these can cause email to stop working or land in spam.

Lower your TTL in advance

If possible, reduce the TTL on your existing records to 300 seconds (5 minutes) a day or two before the change. This means DNS caches expire faster, so the switch happens more quickly.

Disable DNSSEC if enabled

If your domain has DNSSEC enabled at the registrar, disable it before changing nameservers. DNSSEC signatures are tied to the current nameservers, and switching without disabling it first will cause DNS resolution failures.

3. How to Change Nameservers (Step by Step)

The process is the same regardless of your registrar. The interface will look different, but the steps are identical.

Step 1: Get your new nameservers

Your new hosting or DNS provider will give you nameserver addresses. They usually look like ns1.provider.com and ns2.provider.com. You need at least two. Copy them exactly.

Step 2: Log in to your domain registrar

This is where you bought your domain (GoDaddy, Namecheap, Google Domains, Hover, etc.). Not your hosting provider, unless they are the same company.

Step 3: Find the nameserver settings

Look for "DNS Management", "Nameservers", or "DNS Settings" in your domain's management page. Most registrars put this under Domain Settings or an Advanced section.

Step 4: Switch to custom nameservers

Select "Custom DNS" or "Custom Nameservers" instead of the default option. Replace the existing nameserver entries with the new ones from your provider.

Step 5: Save and wait

Save the changes. Propagation takes 1 to 24 hours. Do not make additional DNS changes during this window.

# Verify your nameservers after the change
dig example.com NS +short
ns1.newprovider.com.
ns2.newprovider.com.
# Check with a specific DNS resolver
dig example.com NS @8.8.8.8 +short

4. Changing Nameservers vs Changing DNS Records

This is the most common point of confusion. They are not the same thing and choosing the wrong approach can cause unnecessary downtime.

Changing NameserversChanging DNS Records
What it doesMoves all DNS control to a new providerUpdates one specific record (A, MX, etc.)
Where you make the changeDomain registrarCurrent DNS provider
Propagation time1 to 48 hoursMinutes to a few hours (depends on TTL)
Risk levelHigher (affects all services)Lower (only affects that record)
Best forFull migration to new host or DNS servicePointing website or a subdomain to a new server

If you are only moving your website to a new server but keeping your email and other services with the current provider, update the A record instead. Changing nameservers when you only needed to change an A record is a common mistake that breaks email. For more on how nameservers and DNS records relate, see our guide on DNS vs Nameservers.

5. How to Verify the Change

After saving your new nameservers, do not assume the change worked. Verify it.

# Check NS records from your machine
dig example.com NS +short
# Check from Google's DNS (bypasses local cache)
nslookup -type=NS example.com 8.8.8.8
# Flush your local DNS cache first (Windows)
ipconfig /flushdns

For a global view, use DNSFly's DNS Propagation Checker with the NS record type selected. This shows whether your new nameservers are visible from 21 different locations worldwide. If some locations still show the old nameservers, propagation is still in progress.

6. Common Mistakes

Not recreating DNS records on the new provider

Your old DNS records do not transfer automatically. If you switch nameservers without setting up records on the new provider, your website, email, and all subdomains will stop resolving.

Changing nameservers when you only needed an A record change

If you just need to point your website to a new IP, update the A record. Changing nameservers moves everything, including email routing, which may not be what you intended.

Forgetting to disable DNSSEC

If DNSSEC is enabled and you change nameservers, the old DNSSEC signatures become invalid. DNS resolvers that validate DNSSEC will refuse to resolve your domain until you either disable DNSSEC or set it up on the new provider.

Making the change at the wrong place

Nameserver changes are made at your domain registrar, not at your hosting provider. If your domain is registered at GoDaddy but hosted at a different company, you log in to GoDaddy to change the nameservers.

Making more DNS changes during propagation

During the 1 to 24 hour propagation window, some users will be served by the old nameservers and some by the new ones. Making changes to either set of records during this period creates inconsistencies. Wait for propagation to complete first.

Verify Your Nameserver Change

Check if your new nameservers have propagated across 21 global DNS servers.

? Frequently Asked Questions