Overview

This guide walks you through removing existing MX records in cPanel and configuring your domain to route email through Google Workspace (formerly G Suite / Gmail for Business). Follow each step carefully. DNS changes can take up to 24-48 hours to propagate, though most updates take effect within 1 hour.

Before you begin:

  • Confirm your Google Workspace subscription is active and your domain has been added and verified in the Google Admin Console.
  • Ensure no active mail is being delivered to existing cPanel mailboxes (or migrate mail first using Google's Data Migration Service or IMAP migration).
  • Have your cPanel login credentials ready.

Step 1 - Log In to cPanel

  1. Go to https://yourdomain.com:2083 (replace yourdomain.com with your domain).
  2. Enter your cPanel username and password.
  3. Click Log in.

Step 2 - Open the Zone Editor

  1. From the cPanel home screen, scroll to the Domains section.
  2. Click Zone Editor.
  3. Find your domain in the list and click Manage.

Step 3 - Delete the Existing MX Record(s)

  1. From the Filter dropdown, select MX to display only MX records.
  2. Locate any existing MX entries (commonly yourdomain.com pointing to mail.yourdomain.com).
  3. Click Delete next to each record.
  4. Confirm the deletion in the popup window.
  5. Repeat until no MX records remain.

Important: You will also need to set Email Routing to Remote (see Step 6) so cPanel does not deliver mail locally.

Step 4 - Add the Google Workspace MX Record

Google Workspace now uses a single consolidated MX record (the older five-server setup is being deprecated). Use the following:

Name / Host Type Priority Destination (Value) TTL
yourdomain.com. MX 1 smtp.google.com 3600

If your Google Workspace account still requires the legacy 5-record setup, use these instead:

Priority Destination
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

How to Add the MX Record in cPanel

  1. In the Zone Editor, click + Add Record and choose Add MX Record.
  2. Enter the values from the table above (Name, TTL, Priority, Destination).
  3. Click Add Record to save.
  4. Repeat for each entry if using the legacy 5-record setup.

Step 5 - Add Supporting DNS Records for Google Workspace

  • SPF (TXT): v=spf1 include:_spf.google.com ~all
  • DKIM (TXT): Generate in Google Admin Console > Apps > Google Workspace > Gmail > Authenticate email. Add the returned TXT record at google._domainkey.
  • DMARC (TXT, recommended): v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com

Step 6 - Set Email Routing to Remote

  1. Return to the cPanel home screen.
  2. Under Email, click Email Routing.
  3. Select your domain.
  4. Choose Remote Mail Exchanger.
  5. Click Change.

This tells cPanel to deliver mail via the external MX record rather than locally.

Step 7 - Verify in Google Admin Console

  1. Sign in to admin.google.com.
  2. Go to Account > Domains > Manage Domains.
  3. Select your domain and click Activate Gmail (or Verify MX).
  4. Google will check the MX records and confirm activation.

Step 8 - Test Mail Flow

  • Send a test email from an external account (Outlook, Yahoo, etc.) to a Google Workspace mailbox on your domain.
  • Send an outbound email from the Gmail interface to verify sending works.
  • Check message headers to confirm delivery through google.com mail servers.

Troubleshooting

  • Mail still routes to cPanel mailbox: Email Routing is set to Local. Return to Step 6.
  • Google says MX not found: DNS may still be propagating. Use dig mx yourdomain.com or MXToolbox to verify.
  • SPF softfail / failures: Ensure only one SPF TXT record exists; multiple SPF records will cause authentication failures.
  • DKIM not verifying: Allow up to 48 hours after adding the TXT record before clicking Start Authentication in Google Admin.

If you need further assistance, please open a support ticket and our team will assist.

這篇文章有幫助嗎? 0 用戶發現這個有用 (0 投票)