Moving your website to a new host without breaking your email

Most small business website moves go fine. When one goes wrong, it's usually not the website. It's the email: enquiries stop arriving, invoices bounce, or messages start landing in customers' spam folders a week later.

That happens because the website and the email are usually tied together by the same thing, your domain's DNS. Moving the website often means changing DNS, and it's easy to change more than you meant to.

Here's the order I'd work in for a typical move, whether it's a WordPress site going to better hosting or a site moving to a new platform altogether.

First, work out what you actually have

Before touching anything, answer three questions:

  • Where is the domain registered? That's who you pay for the name itself (for a .nz domain, a registrar authorised by the Domain Name Commission).
  • Who runs the DNS? Often the registrar or the old web host, sometimes a separate service like Cloudflare. This is where the records that point your domain at things actually live.
  • Where does the email live? Google Workspace, Microsoft 365 or a mailbox bundled with the old host.

The last one matters most. If your email is hosted by the old web host, cancelling that hosting can delete the mailboxes. That needs its own plan before anything else happens.

Write down every DNS record

Export or copy every record from your current DNS: A, AAAA, CNAME, MX and TXT. Save it somewhere you'll find it again.

The records that keep email working are:

  • MX records, which say which servers accept mail for your domain.
  • SPF, a TXT record listing which services are allowed to send as your domain.
  • DKIM, a TXT record (often at a name like google._domainkey) that lets receivers check messages weren't forged.
  • DMARC, a TXT record at _dmarc that tells receivers what to do when those checks fail.

Gmail's sender guidelines recommend setting up all three of SPF, DKIM and DMARC, and messages that fail authentication are more likely to be rejected or sent to spam. In my experience DKIM and DMARC are the ones most often left behind, because some DNS import tools pick up MX and SPF automatically but miss records on subdomains.

Lower the TTL a day or two ahead

Every DNS record has a TTL (time to live): how long other systems may cache the old answer. If your website's record has a TTL of a day, some visitors could keep reaching the old server for up to a day after you change it.

A day or two before the move, lower the TTL on the records you're about to change, for example to five minutes. Cloudflare's TTL documentation explains how this works if you want the detail. You can put it back up once the move has settled.

Build and test on the new host first

Copy the site to the new host and test it before changing DNS. Most hosts give you a temporary address or a way to preview the site. Check:

  • the home page, a few inner pages and any images or downloads
  • contact forms, and that the messages actually arrive
  • logins, and for an online store, a full test order
  • that the site loads over HTTPS once the new certificate is in place

If it's a WordPress site, also confirm the database copy is complete and that any scheduled tasks, caching and backup plugins work on the new server.

If you're moving DNS too, recreate records before switching

Sometimes the move also changes who runs DNS, for example moving nameservers from the old host to Cloudflare. That's the riskiest step, because changing nameservers swaps out all your records at once.

Set up every record at the new DNS provider first, compare it line by line against the list you saved, and only then change the nameservers at the registrar. Afterwards, check from outside that the MX records still point to your email provider. If they come back empty, stop and fix that before doing anything else.

Switch, then test email both ways

When you point the domain at the new host:

  1. Check the website loads on both www and the bare domain, and that one redirects to the other.
  2. Send an email to your business address from a personal account and confirm it arrives.
  3. Send one from your business address to a Gmail or Outlook address, then open the message details and check SPF, DKIM and DMARC show as passed.
  4. Submit your website's contact form and confirm it arrives. Forms often send through the web server, so they can break even when your normal email is fine.

Don't cancel the old hosting straight away

Keep the old hosting running for a week or two. If something was missed, like an old mailbox, a file you forgot or a record that didn't come across, you can still get it back. Cancel it once you're sure nothing still depends on it.

Where I fit in

I look after WordPress and WooCommerce sites for small NZ businesses, and moving a site to better hosting is often part of that work. If you're planning a move and want someone to check the DNS and email side before you flip the switch, send me a short note with your site address and where your email lives.