← Back to Blog

Changing nameservers without losing email: the order that matters

  • Gmail
  • Admin console
  • Google Workspace
Changing nameservers without losing email: the order that matters

The move itself takes two minutes. You sign in to the registrar, replace the nameserver entries with the ones your new DNS host gave you, and save. The website keeps answering, because the new host already has the A record. Mail is the part that goes quiet, and it goes quiet gradually: a few senders still reach you for an hour or two, then fewer, then none. The bounces land in other people's mailboxes, not yours, so nobody tells you.

We usually get called into this a week later, by which point the nameservers have been switched back and there are two half-correct zones to reconcile. The work is not complicated. It is unforgiving about order, and the two steps that matter most happen before the switch, not after.

Why mail breaks when the website does not

Nameservers decide which servers answer every question about your domain. Change them and the answers come from a zone you built recently, which contains exactly what you put in it. A new zone almost always gets the website records first, because a missing website is visible within seconds. The mail records are not. You cannot see an MX record from a browser.

Google is blunt about the MX half of this: if Gmail is working, do not change your MX records, because doing so could cause incoming messages to bounce. A nameserver change has the same effect, except that you never touched the MX record. You replaced the zone that held it.

Authentication fails more quietly. A domain with no SPF record, no DKIM key at the selector your mail is signed with and no DMARC policy still sends, and messages still leave your tenant. They just arrive weaker, and the senders that were already borderline start landing in spam. Google's guidance is to set up SPF and DMARC alongside DKIM, and it requires all three of them from bulk senders, so a new zone that is missing two of the three is not a cosmetic gap.

The move, in order

  1. Export the current zone before anything else. Every record, including the ones you do not recognise. The records nobody can explain are usually the ones that belong to a service someone connected years ago: a help desk, an e-signature tool, a tracking domain. Copy them across anyway and work out what they are afterwards.
  2. Lower the TTLs a day or two early. Cloudflare's migration guidance is to lower them 24 to 48 hours before the window, or longer if your current values are long, with 300 seconds a common value to drop to. Do it early, because a TTL change is itself held by the old TTL: a record cached for four hours stays cached for four hours, new value and all.
  3. Settle DNSSEC before you touch anything else. This is the step that takes the entire domain offline rather than just the mail, and it is covered on its own below.
  4. Build the new zone completely, then compare it line by line against the export. Not from memory and not by eye. Count the records on both sides. A zone that is short by one TXT record looks perfectly healthy in a dashboard.
  5. Switch the nameservers at the registrar. This is the point of no return for anything you forgot, because from here the old zone stops being authoritative for every resolver that has picked up the change.
  6. Verify from outside, not from your own machine. Check what is actually published with a public lookup such as Google's Admin Toolbox Dig, then send a real message in from a mailbox on another provider, and one back out to it. Google notes that some registrars are slower to publish records and suggests waiting an hour before trying again when its setup tool cannot find them.
  7. Leave the old DNS host alone for several days. The registry can show your new nameservers while a given resolver still follows the old delegation until its cached copy expires. Delete the old zone the same afternoon and those resolvers get nothing at all. Cancel the old hosting next week instead.
  8. Put the TTLs back. Short TTLs are a migration tool, not a permanent setting.

Step six is where most people stop too early. A successful lookup proves a record exists. It does not prove that a signed message from your tenant passes at the receiving end, and those are different questions. If the test message arrives but something in the headers still looks wrong, check the domain end to end before you call the move finished.

The records that have to survive the move

These are the ones we count twice. When Google tells you to replace your MX records it also tells you to keep your A, AAAA, CNAME, SRV and TXT records, which is the same instruction read from the other direction.

RecordWhere it livesWhat breaks if it is missing
MXRoot of the domainEvery inbound message bounces at the sending server. Nothing reaches you and nothing queues.
SPF, a single TXTRoot of the domainOutbound mail stops passing SPF. Only one SPF record per domain is allowed, so never solve this by adding a second one.
DKIM TXTgoogle._domainkey, or your selector plus ._domainkeySignatures fail to verify and DMARC loses its second way to align.
DMARC TXT_dmarcYour policy and your aggregate reports both stop. Spoofing goes unnoticed.
Sender records for other toolsSubdomains, usually CNAME or TXTInvoicing, CRM or marketing mail falls out of alignment and starts failing DMARC.
A, AAAA, CNAME, SRVRoot and subdomainsWebsite, autodiscover and sign-on endpoints. Visible immediately, which is why they rarely get missed.

For a domain where Google Workspace carries the mail and nothing else sends, the mail half of the new zone is short:

@                  MX   1   smtp.google.com.
@                  TXT  "v=spf1 include:_spf.google.com ~all"
_dmarc             TXT  "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
google._domainkey  TXT  "v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY"

That single MX record is Google's current instruction for new setups and for changes. Domains configured before 2023 use five records starting with ASPMX.L.GOOGLE.COM at priority 1, and Google says the legacy set keeps working indefinitely, so a DNS move is not the moment to modernise it. Copy what you already have and change it on a separate day. The DKIM value is the long public key from your own Admin console, not a shared string, and some DNS providers cap TXT record length, which Google documents workarounds for. If your records sit at Cloudflare, the proxy and flattening behaviour there adds a few of its own habits worth knowing before you rebuild.

The DNSSEC step that takes the whole domain down

DNSSEC is the one failure in this job that has nothing to do with mail, which is why we ask about it first. The DS record that anchors the chain of trust does not live with your DNS provider. It lives at the registrar, in the parent zone, and it stays there when you point your nameservers somewhere else.

If the DS stays and the new provider is not serving a signed zone with matching keys, validating resolvers stop answering for every name in your domain and return SERVFAIL. Not a wrong answer. No answer. A sending server cannot look up your MX record, so it cannot even decide to bounce properly, and the website goes down with the mail.

If you are turning DNSSEC off for the move, remove the DS at the registrar well before the nameserver change and confirm it is gone with dig DS example.com. If you are keeping DNSSEC on, publish the new provider's DS first and wait out the parent zone's DS TTL, ideally up to one and a half times that TTL, before you switch. Either way, an incorrect DS record does not heal while you wait, so time is not the fix. And when you are trying to work out whether a dead domain is a DNSSEC problem at all, dig +cd example.com asks for the answer with validation switched off. If that returns something and the ordinary query does not, you have found it.

One more thing worth knowing before someone panics: Google says the google-site-verification TXT record can be safely removed once your domain is verified, so a missing verification record is not usually what broke your mail. Check MX, SPF, DKIM and DMARC first.

What we check in the two weeks after

A DNS move has a long tail, because the senders that break are the ones nobody tests.

  • DMARC aggregate reports. If they were arriving before and have stopped, the _dmarc record or its rua address did not survive the move. If they are arriving, read them for a source that used to pass and no longer does. Reports that quietly stop hide exactly this.
  • The DKIM selector in real signed mail. Headers tell you which selector your tenant signs with, and that is the only name that has to exist in DNS. Rotating a DKIM key in the same fortnight, before the new zone has settled, is how a team ends up with two broken selectors instead of one.
  • Policy hosts for anything strict. If the domain publishes an MTA-STS policy, its host and TXT record have to come across with everything else, or the policy fails in a way nobody notices until a receiver enforces it.
  • The records you could not explain. Work out what each one was for now that there is no deadline. Delete the dead ones deliberately, one at a time, a week apart.

The risky part of this job is small and specific: the DS record at the registrar, and the nameserver switch itself. Everything else can be corrected in the new zone in minutes. Those two cannot, which is why we do them in that order, with the zone already built and verified, and never on a Friday afternoon.

How Guanacos Tech helps

We run DNS moves for small and mid-sized teams as a scheduled job: inventory the current zone, rebuild it at the new provider, handle the DS record, switch the delegation in a window when your mail volume is low, then watch authentication for the fortnight after. Plenty of clients arrive for email deliverability consulting for small business and discover during the audit that a DNS move two years ago is why one of their senders never passed DMARC. If you have a move coming up, or you have just done one and something is not arriving, a 30-minute call is enough to say which of the two risky steps is in play.

Sources

Next step

Would you rather we did this for you?

Thirty minutes on Google Meet, free. We look at your domain or project with you, tell you what is wrong and what we would do first. If you can fix it yourself, we say so.

Book a 30-minute call or read about our email deliverability service

Frequently asked questions

Can I test the new DNS zone before I switch the nameservers?

Yes, and you should. Query the new provider’s nameservers directly by name, for example with dig @ns1.newprovider.net example.com MX, and compare every answer against your export. The zone is already live there; it is just not delegated yet, so a mistake costs you nothing until you switch.

Does changing nameservers break my Google Workspace domain verification?

Not usually. Google says the google-site-verification TXT record can be safely removed once your domain is verified, so a missing verification record is rarely the cause of a mail outage. Copy it across anyway, because it costs nothing, then look at MX, SPF, DKIM and DMARC.

How long should I keep paying for the old DNS host?

A few days past the switch, not a few hours. A resolver can keep following the old delegation until its cached copy expires, even while the registry already shows your new nameservers, so the old zone has to keep answering correctly in the meantime.