Google Workspace gives you Gmail, Calendar and Drive on your own domain. Your website can stay on MdmHost cPanel hosting; only the email-related DNS records change. This guide lists every record and the one cPanel setting people often forget.
Before you start
- The domain uses the MdmHost nameservers (otherwise edit DNS at your provider).
- A Google Workspace account and access to the Google Admin console.
- A plan for existing cPanel mail; Google's data migration tool or IMAP copying can move old messages.
Step 1: verify the domain
- In the Google Admin console start domain verification and choose the TXT record method.
- In cPanel open Domains → Zone Editor → Manage and click Add Record → TXT.
- Name
example.com., Recordgoogle-site-verification=…(copy it exactly). Save. - Click Verify in Google. It usually succeeds within minutes.
Step 2: switch MX to Google
- In Zone Editor click the MX filter and delete the existing MX record pointing to your domain.
- Add an MX record: priority
1, destinationsmtp.google.com. - Older Google setups used five records (
aspmx.l.google.comand alternates). Those still work, but the singlesmtp.google.comrecord is Google's current recommendation.
Step 3: set Email Routing to remote
Open cPanel → Email → Email Routing, select the domain, choose Remote Mail Exchanger and click Change. Otherwise mail sent from your website or other accounts on the server stays local and never reaches Gmail. See MX records and Email Routing.
Step 4: SPF, DKIM and DMARC
| Record | Name | Value |
|---|---|---|
| SPF (TXT) | example.com. | v=spf1 include:_spf.google.com +a +mx ~all |
| DKIM (TXT) | google._domainkey.example.com. | The key generated in Admin console → Apps → Google Workspace → Gmail → Authenticate email |
| DMARC (TXT) | _dmarc.example.com. | v=DMARC1; p=none; rua=mailto:dmarc@example.com |
- Edit the existing SPF record rather than adding a second one. Keep
+a +mxor your server IP if the website still sends mail from MdmHost; better still, send website mail through Google's SMTP. - cPanel may already have a
default._domainkeyrecord for its own DKIM. Leave it; Google uses thegoogleselector. - After adding the DKIM record, click Start authentication in the Admin console.
- Tighten DMARC later; see DMARC reports and policies.
Tip: To use a branded webmail address, add a CNAME mail.example.com. → ghs.googlehosted.com and enable the custom URL in the Admin console. Remove cPanel's existing mail record first if it conflicts.
Check everything
- Run
nslookup -type=MX example.comand confirmsmtp.google.com. - Send a test from an outside account; then open the message in Gmail → Show original and check SPF, DKIM and DMARC say PASS.
- DNS caching may take a while; see check DNS propagation.
Troubleshooting
- Website forms not reaching Gmail: Email Routing is still Local.
- Verification fails: duplicated domain in the name field (
example.com.example.com) or quotes copied into the value. - Old cPanel mailboxes still receive mail: some senders cache the old MX; wait for the TTL before deleting them.
