MX records tell other mail servers where to deliver email for your domain. By default they point to your MdmHost cPanel server. If you move your mailboxes to Google Workspace or Microsoft 365, you change the MX records and tell cPanel to stop accepting mail locally. Getting both parts right prevents lost or bounced messages.
Before you start
- Your domain uses the MdmHost nameservers (otherwise change MX at your DNS provider).
- The MX values from your email provider's setup wizard.
- If you already have mail in cPanel, plan how to move it, for example with an IMAP migration from the provider.
Change the MX records
- Open cPanel → Domains → Zone Editor and click Manage next to the domain.
- Click the MX filter to show only mail records.
- Delete or edit the existing record that points to your domain, for example
example.comwith priority0. - Click + Add Record, choose MX, and add the provider's values:
Provider Priority Destination Google Workspace 1smtp.google.comMicrosoft 365 0example-com.mail.protection.outlook.com(from your admin centre) - Click Save Record.
A lower priority number means "try first". If the provider gives several MX records, add them all with their priorities.
Set Email Routing
cPanel decides per domain whether it is the final destination for email. If it still thinks it is local, mail sent from forms or other mailboxes on the same server will be delivered locally and never reach Google or Microsoft.
- Open cPanel → Email → Email Routing.
- Choose the domain.
- Select Remote Mail Exchanger and click Change.
| Option | Meaning |
|---|---|
| Automatically Detect Configuration | cPanel guesses from the MX records. Usually correct, but explicit is safer. |
| Local Mail Exchanger | Mailboxes live in this cPanel account (default). |
| Backup Mail Exchanger | This server only queues mail if the primary is down. |
| Remote Mail Exchanger | Mail is hosted elsewhere; cPanel always sends it out. |
Update SPF and DKIM
Your SPF record must allow the new provider. Edit the TXT record that starts with v=spf1 and include, for example, include:_spf.google.com or include:spf.protection.outlook.com. Keep +a +mx or the server IP if your website still sends mail from MdmHost. Add the provider's DKIM record too. Details: SPF, DKIM and DMARC in cPanel.
Tip: Lower the MX TTL to 300 a day before the switch so mail moves to the new provider quickly.
Switching back to cPanel email
- In Zone Editor, delete the provider's MX records and add
MX 0 example.com(ormail.example.com). - In Email Routing, choose Local Mail Exchanger.
- Restore the default SPF in Email Deliverability → Repair.
Troubleshooting
- Contact form emails never arrive: Email Routing is still Local. Change it to Remote.
- "Mail delivery failed" after the move: the old MX is still cached; wait for the TTL and check with
nslookup -type=MX example.com. - Messages land in spam: SPF still lists only the old server. See why emails go to spam.
