KB
DNS

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#

  1. Log in to your cPanel account.
  2. Under the Domains section click Zone Editor.

Step 2: Update MX Records#

  1. In Zone Editor find your domain and click Manage.
  2. Remove any existing MX records that point to your hosting server.
  3. Add the following Google MX records (each record should end with a dot .):
PriorityServer
1ASPMX.L.GOOGLE.COM.
5ALT1.ASPMX.L.GOOGLE.COM.
5ALT2.ASPMX.L.GOOGLE.COM.
10ALT3.ASPMX.L.GOOGLE.COM.
10ALT4.ASPMX.L.GOOGLE.COM.

Important: Delete old MX records before saving new ones. Incorrect MX records will cause email delivery failures.

To improve deliverability and prevent spoofing, add the following records:

SPF#

text
Type: TXT
Name: @ (or yourdomain.com)
Value: v=spf1 include:_spf.google.com ~all

DKIM#

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)#

text
Type: TXT
Name: _dmarc
Value: v=DMARC1; p=quarantine; rua=mailto:postmaster@yourdomain.com

Step 4: Change Email Routing in cPanel#

  1. Go to Email Routing in cPanel.
  2. Select your domain.
  3. Choose Remote Mail Exchanger. This tells cPanel that mail is handled externally (by Google).

Step 5: Verify Domain in Google Admin Console#

  1. Log in to the Google Admin Console.
  2. Verify domain ownership by adding the TXT verification record provided by Google in cPanel.
  3. 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.