How to Update Google Workspace DNS in cPanel and Route Email to Google Workspace
2 min read402 words2 code blocks
At a glance#
- Purpose: Point a cPanel-hosted domain's email to Google Workspace by updating MX records and mail routing.
- Applies to: cPanel & WHM with Google Workspace.
- Risk: High - incorrect MX records cause mail to be lost or bounced.
- Time: About 45 minutes plus DNS propagation.
Step 1: Log in to cPanel#
- Log in to your cPanel account.
- Under the Domains section click Zone Editor.
Step 2: Update MX Records#
- In Zone Editor find your domain and click Manage.
- Remove any existing MX records that point to your hosting server.
- Add the following Google MX records (each record should end with a dot
.):
| Priority | Server |
|---|---|
| 1 | ASPMX.L.GOOGLE.COM. |
| 5 | ALT1.ASPMX.L.GOOGLE.COM. |
| 5 | ALT2.ASPMX.L.GOOGLE.COM. |
| 10 | ALT3.ASPMX.L.GOOGLE.COM. |
| 10 | ALT4.ASPMX.L.GOOGLE.COM. |
Important: Delete old MX records before saving new ones. Incorrect MX records will cause email delivery failures.
Step 3: Add SPF, DKIM, and DMARC (Recommended)#
To improve deliverability and prevent spoofing, add the following records:
SPF#
Type: TXT
Name: @ (or yourdomain.com)
Value: v=spf1 include:_spf.google.com ~allDKIM#
In the Google Admin Console go to Apps > Google Workspace > Gmail > Authenticate email (DKIM). Google will give you a selector and a TXT record to add in cPanel. Add the TXT record exactly as provided by Google.
DMARC (optional)#
Type: TXT
Name: _dmarc
Value: v=DMARC1; p=quarantine; rua=mailto:postmaster@yourdomain.comStep 4: Change Email Routing in cPanel#
- Go to Email Routing in cPanel.
- Select your domain.
- Choose Remote Mail Exchanger. This tells cPanel that mail is handled externally (by Google).
Step 5: Verify Domain in Google Admin Console#
- Log in to the Google Admin Console.
- Verify domain ownership by adding the TXT verification record provided by Google in cPanel.
- After verification, Google will accept mail for your domain.
Step 6: Test Your Setup#
- Send a test email to your Google Workspace address (e.g.,
info@yourdomain.com). - Confirm it arrives in Gmail. If it does not, re-check MX records and Email Routing settings.
Troubleshooting Tips#
- DNS changes can take up to 24–48 hours to fully propagate, but usually occur sooner.
- Ensure each MX entry ends with a dot (
.), and priorities are correct. - If you still receive email on the server after switching, check that there are no local mailboxes with the same address on the hosting server or that Email Routing is set to Remote.