How-to · DNS and domains

Change nameservers without breaking email or your website

At the end your domain is delegated to a new DNS host that already holds a full copy of your records, so mail and web traffic carry on without a gap.

Updated 4 Nov 20268 steps5 official sources
Before you start

What you need before step 1

Applies to: Any domain, moving DNS hosting between providers such as a registrar, web host, Cloudflare, Amazon Route 53, Azure DNS or Google Cloud DNS

Admin roles you need

  • A login to the domain registrar account (where the domain is registered and renewed)
  • A login to both the current and the new DNS host with permission to view and create records

Licences

None needed.

Download

BIND 9 from ISC (includes dig)Only needed on macOS or Linux if dig is missing. Windows has nslookup built in.https://www.isc.org/download/Download

Also have ready

  • Two days of lead time if you want to lower the NS TTL first (see Lower DNS TTL before a migration)
  • The domain is not locked by a security hold that blocks nameserver edits (some registrars ask for an identity code)
Step by step

8 steps

  1. 1

    Know the difference between registrar and DNS host

    Where: Reading only

    The registrar is where you bought and renew the domain. It tells the internet which nameservers are authoritative for the domain (RFC 1035 describes an NS record as naming a host that should be authoritative for the domain). The DNS host runs those nameservers and holds your actual records: MX, A, CNAME, TXT. They are often the same company but do not have to be.

    Changing nameservers moves all DNS answers to the new host at once. GoDaddy warns that changing nameservers may break existing connections to your website or email, and that with custom nameservers DNS is managed outside GoDaddy.

    You should see: You know which company is the registrar and which is the current DNS host.
  2. 2

    Record the current nameservers

    Where: Command Prompt on Windows, or Terminal on macOS or Linux, on your admin PC

    Save the current nameserver names. You need them to roll back.

    nslookup -type=ns contoso.com
    dig NS contoso.com +short
    You should see: Two or more nameserver host names. Copy them into your change record.
  3. 3

    Export or list every record at the current DNS host

    Where: Current DNS host control panel > your domain > DNS records

    Get a complete copy of the zone. Amazon suggests asking your current provider for a zone file or records list; not every provider offers one. If there is no export, screenshot or copy every record: A, AAAA, CNAME, MX, TXT (SPF, DKIM, DMARC, verification), SRV and any subdomains. Check the records you know about with lookups as well.

    dig contoso.com A +short
    dig www.contoso.com CNAME +short
    dig MX contoso.com +short
    dig TXT contoso.com +short
    dig TXT _dmarc.contoso.com +short
    dig CNAME autodiscover.contoso.com +short
    You should see: A full list of records with type, name, value, priority (for MX) and TTL.
  4. 4

    Create the zone at the new DNS host

    Where: New DNS host control panel (for example Cloudflare dashboard, Route 53 console > Hosted zones, Azure portal > DNS zones, or Google Cloud console > Cloud DNS)

    Add the domain as a new zone, import the zone file if the host supports it, or create each record by hand so it matches the list from step 3 exactly. Leave out the old host's own NS and SOA records; the new host creates its own.

    You should see: The new zone shows every record from step 3, and the host displays the nameserver names assigned to your zone (Route 53 shows four under Name servers in the Hosted zone details).
  5. 5

    Test the new zone before switching

    Where: Command Prompt on Windows, or Terminal on macOS or Linux

    Ask one of the new nameservers directly for each important record. The domain is not delegated yet, so only a direct query shows what the new host will answer.

    dig @ns1.newhost.example contoso.com MX +short
    dig @ns1.newhost.example www.contoso.com +short
    nslookup -type=mx contoso.com ns1.newhost.example
    You should see: Each answer matches what the current host returns today.
  6. 6

    Change the nameservers at the registrar

    Where: Registrar control panel > your domain > Nameservers (GoDaddy: Domain Portfolio > domain > DNS > Nameservers)

    Choose the option to use your own or custom nameservers, remove the old entries and enter all the nameserver names from the new host. If the registrar will not let you delete the old ones, Amazon says to choose custom nameservers and add all of the new ones. Select Save. At GoDaddy, select Save then Continue; domains with Domain Protection may ask for a verification code.

    You should see: The registrar shows only the new nameservers for the domain.
  7. 7

    Watch the delegation change

    Where: Command Prompt on Windows, or Terminal on macOS or Linux

    Check the NS records through public resolvers. Amazon notes registrars typically use a TTL of 24 to 48 hours for nameservers, so the change can take up to two days. GoDaddy says most changes take effect within about an hour but global updates can take up to 48 hours.

    dig NS contoso.com +short
    dig @8.8.8.8 NS contoso.com +short
    nslookup -type=ns contoso.com 1.1.1.1
    You should see: The new nameserver names are returned.
  8. 8

    Monitor mail and web, then tidy up

    Where: Your website, a test mailbox, and the old DNS host

    Browse the site and send test mail in and out. Amazon says to monitor traffic and, if it slows or stops, change the nameservers back to the old ones you noted. Keep the old zone unchanged for a few days in case you need to roll back, then cancel it. Raise the NS TTL back to a normal value.

    You should see: Website and email work normally with DNS served by the new host.
From experience

Expert tips

Turn off DNSSEC before you switch

If the domain uses DNSSEC, remove the DS record at the registrar before changing nameservers. Amazon notes you cannot have DNSSEC signing across two providers at the same time; leaving the old DS in place makes validating resolvers reject the new zone and the domain disappears for those users. Re-enable DNSSEC at the new host once the move has settled.

Get a zone file or full records list

A dig query only shows names you already know about, so it misses DKIM selectors, verification TXT records, SRV records and odd hostnames. Ask the current host for a zone file export (Amazon notes not every provider offers one). If you import into Route 53, records arrive as simple routing records, so recreate any alias or special records by hand.

Compare old and new zones record by record

Before changing the registrar, query both sets of nameservers for every name in the export, for example dig @old-ns.example.com www.contoso.com +short and dig @ns1.newhost.example www.contoso.com +short, and diff the results. Pay attention to MX, SPF, _dmarc, _domainkey and autodiscover, which break mail silently.

Keep the old DNS host running

Resolvers can keep the old NS records for up to two days (Amazon notes the typical NS TTL is 172800 seconds), and your rollback is simply to set the old nameservers back. Do not cancel or empty the old zone, and do not edit records only at the old host, until traffic and mail have been fine for several days.

Lower the NS TTL first where you can

Amazon recommends lowering the NS TTL at both the old and new providers (60 to 900 seconds) and waiting two days before the switch, so a problem can be reversed quickly. Restore a normal value, such as 172800 seconds, afterwards.

Check it worked

How to confirm it worked

  • dig NS contoso.com +short or nslookup -type=ns contoso.com returns only the new nameservers.

  • dig MX contoso.com +short and dig www.contoso.com +short through a public resolver (for example @8.8.8.8) return the same values as before the move.

  • Google Admin Toolbox Dig (https://toolbox.googleapps.com/apps/dig/) shows the expected NS and MX records.

Undo

How to reverse it

Rollback:

Reversible while the old DNS zone still exists. At the registrar, replace the new nameservers with the old ones you saved in step 2. The rollback also takes time to spread because of NS caching (Amazon says up to two days), which is why you lower the NS TTL in advance where possible.

Troubleshooting

Errors you might see

Website or email stops working after the change

Cause: A record was missed when copying the zone. GoDaddy warns that changing nameservers may break website or email connections.

Fix: Compare the old record list with the new zone, add the missing record at the new host, or switch nameservers back.

Edits at the new host have no effect

Cause: Amazon notes that if the registration uses the name servers of another zone, changes in the zone you edited will not show.

Fix: Check that the nameservers at the registrar exactly match the ones assigned to the zone you edited.

Some people see the new host, others the old one

Cause: Resolvers cache NS records; Amazon says registrars typically use a 24 to 48 hour TTL for name servers.

Fix: Keep both zones identical until the old TTL has passed.

FAQ

Questions

Do I need to move my domain registration to change nameservers?

No. You keep the registration where it is and only change the nameserver entries.

Do my DNS records move automatically?

No. Records live at the DNS host. Copy every record to the new host before switching; GoDaddy does not say records carry over.

How long does a nameserver change take?

GoDaddy says most take about an hour and up to 48 hours globally; Amazon says up to two days.

Should I change nameservers or just change MX?

If you only need email to move, change MX at the current DNS host. Change nameservers only when you want a different company to host all your DNS.

Sources

Official sources

Vendors change menus and requirements. Confirm on the source before you rely on a detail. Last checked 4 Nov 2026.