MX records: why changing your website can break email
An MX record is the line in your domain's settings that tells the world where to deliver email for your address. Your website and your email share one domain but use different records, so a website change should not touch your email. It breaks email when the move wipes or replaces the records the email depends on, which happens most often when someone changes the domain's nameservers to the new website company without copying the mail records across. Knowing which lines to protect takes ten minutes and saves days of missed messages.
Your domain's address book, in plain words
Every domain has a small list of records called DNS (the Domain Name System, the internet's address book). Each record answers one question:
- A record: what is the address of the computer that shows the website? The answer is a number like 192.0.2.10.
- CNAME record: this name is really another name, look that one up instead. Often used for www.
- MX record: where should email for this domain be delivered? The answer is a mail server's name, such as one run by Google, Microsoft or your host, with a priority number.
- TXT record: a short line of text. Used to prove ownership and to tell other mail servers which servers may send mail as you.
The website lives on the A and CNAME records. Email lives on MX and some TXT and CNAME records. They sit side by side on the same list, which is exactly why one careless edit can hit both.
How a website change breaks email
There are three usual ways it happens.
1. Nameservers change, and the mail records are left behind. Nameservers decide which company holds your DNS list. When a new website company asks you to change nameservers to theirs, you are not editing your list; you are swapping it for a new, mostly empty one at the new company. If nobody re-creates your MX records there, mail has nowhere to go. Senders' servers retry for a while, then give up and bounce the message. Customers see an error, or they see nothing and assume you ignored them.
2. The email lived with the old host. Many hosting plans include email. If you cancel the old hosting when the new site goes live, the mailboxes are switched off with it, even if the MX records still point there.
3. Someone tidies up records they do not recognize. A helper sees lines that look odd, like a long TXT value or a CNAME called autodiscover, and deletes them to make room for the new site. Mail may keep arriving, but your outgoing mail starts landing in spam, or Outlook on your computer stops connecting.
What to write down before any website change
Sign in wherever your DNS is managed and record these lines exactly. A screenshot of the whole list is good; a typed copy of the email ones is better.
- Every MX record: the server name and the priority number.
- The SPF record: a TXT record whose value starts with "v=spf1".
- DKIM records: TXT or CNAME records with "_domainkey" in the name.
- The DMARC record: a TXT record at "_dmarc".
- Mail CNAMEs: names like autodiscover, mail, webmail, email or lyncdiscover.
- Verification TXT records: values starting with "google-site-verification=" or "MS=" and similar. They prove to your email provider that you still own the domain.
Two safe ways to point the domain at a new site
Keep your DNS where it is, and change only the website records. You (or the new site's company) edit the A record for the bare domain and the CNAME or A record for www, and leave everything else exactly as it is. Mail is never touched. This is usually the gentler route for a business with working email. Keeping your domain where it is and pointing it at a new site walks through it.
Move the nameservers, but copy the mail records first. If you do switch nameservers, re-create every record from your list at the new DNS company before you make the switch. Many DNS companies scan your current records and import them automatically; check that the import caught every MX, TXT and mail CNAME, because scans sometimes miss records with unusual names.
Either way, do not cancel the old hosting until you know where your mailboxes actually live. If the old host is the one storing your mail, move the mail first. The order is in moving your business email to a new provider.
How to check your MX records yourself
You do not need special software.
- Your DNS settings page shows them in a list. Filter or sort by type and look for MX.
- Your email provider's admin page often has a "check DNS" or "domain status" screen that tells you whether the MX records match what it expects.
- A free DNS lookup site: search for "MX lookup", type your domain, and it shows what the rest of the internet currently sees.
If the MX lookup shows nothing, or shows a server belonging to a company you no longer pay, your mail is not reaching you.
If your email has already stopped
- Do not panic-cancel anything. Find your old screenshot or ask your email provider for its required records.
- Add the MX records back at whichever company now manages the DNS.
- Add back SPF, DKIM and the mail CNAMEs.
- Wait an hour, then send yourself a test from an outside account.
- Ask your provider whether messages that bounced can be recovered. Usually they cannot, because the sender's server gave up, so tell regular customers and suppliers to resend anything important from the last few days.
Before your next website change
- Screenshot your full DNS list today, even if no change is planned.
- Find out which company stores your mailboxes and write it down.
- Tell whoever builds the new site that email must keep working, and ask how they will change the website records without touching mail.
- After the switch, send and receive a test message within the hour.
A good website move changes only the website's records and leaves the rest alone. If you are planning one, you can see your site rebuilt first as a preview, and change the domain only when the new site and your email plan are both ready.