Before you start
- An admin account for Google Workspace or Microsoft 365
- Access to the domain's DNS — the nameservers decide where that is
- Mailboxes created at the new provider for every address you use
Step 1: Verify that you own the domain
Both providers give you a TXT record to add at the bare domain (@). Google's starts with google-site-verification=; Microsoft's starts with MS=. It sits alongside your SPF record — it does not replace it.
@ TXT google-site-verification=<value from Google> @ TXT MS=ms12345678Step 2: Delete the old MX records
Remove every MX record pointing at the previous mail server, such as mail.yourdomain.com. Leaving one in place means some senders deliver to the old server, by priority or on failure, and that mail never reaches the new inbox.
Step 3: Add the new MX records
Google Workspace uses a single MX record for new setups. Microsoft 365 gives each domain its own MX target in the admin center under Settings → Domains; copy it exactly, as the format varies between tenants. Microsoft also asks for an autodiscover CNAME so Outlook can configure itself.
Google: @ MX 1 smtp.google.com. Microsoft: @ MX 0 yourdomain-com.mail.protection.outlook.com. autodiscover CNAME autodiscover.outlook.com.Step 4: On cPanel hosting, set email routing to remote
Email → Email Routing → select the domain → Remote Mail Exchanger. If it stays on Local, the hosting server still believes it handles your mail, so messages your own website sends to your addresses — contact forms, order notifications — are delivered into a cPanel mailbox nobody reads.
Step 5: Update SPF in the same record
Add the new provider to your existing SPF record. Keep the hosting server in it if your website sends mail directly. There must still be only one SPF record.
Google: v=spf1 include:_spf.google.com ~all Microsoft: v=spf1 include:spf.protection.outlook.com ~allStep 6: Turn on DKIM and test from outside
Enable DKIM at the provider (see the DKIM tutorial), then send a message from an unrelated account, such as a personal address at another provider, and reply to it. Confirm the MX change with dig.
dig +short MX yourdomain.com
The mistake people make
Leaving cPanel email routing on Local. Mail from the outside world reaches Google or Microsoft, so everything looks fine — but every contact-form message from your own website lands in a hosting mailbox nobody checks.
