Colonel Server

This article explains how to configure DNS settings in cPanel so a domain can use Google Workspace for email and collaboration services. The process replaces local mail handling with Google mail servers.

Prerequisites and warnings

  • You must have an active Google Workspace subscription for the domain.
  • DNS changes affect email delivery for the domain.
  • After switching MX records, email accounts are managed in Google Workspace, not in cPanel.

These steps apply to standard cPanel hosting environments.

Step 1: Create and verify a Google Workspace account

  1. Create a Google Workspace account for the domain.
  2. Access the Google Workspace admin console.
  3. Complete domain verification using one of the supported verification methods.

Google services remain inactive until domain verification is completed.

Step 2: Remove existing MX records

  1. Log in to cPanel.
  2. Open the Tools page.
  3. In the Domains section, click Zone Editor.
  4. Locate the domain and click Manage.
  5. Identify all existing MX records.
  6. Delete each existing MX record.

[Screenshot placeholder: Zone Editor showing existing MX records]

Save the current DNS configuration before deleting records so it can be restored later if needed.

Step 3: Add Google Workspace MX records

Primary MX record

  1. In Zone Editor, click Add MX Record.
  2. Set the zone name to the domain.
  3. Confirm TTL is set to 14400.
  4. Set Priority to 1.
  5. Set Destination based on signup date:
    • Accounts created before April 2023: aspmx.l.google.com
    • Accounts created after April 2023: smtp.google.com
  6. Save the record.

Additional MX records for older accounts

If the account was created before April 2023, add the following records:

  • Priority 5, Destination alt1.aspmx.l.google.com
  • Priority 5, Destination alt2.aspmx.l.google.com
  • Priority 10, Destination alt3.aspmx.l.google.com
  • Priority 10, Destination alt4.aspmx.l.google.com

[Screenshot placeholder: Google Workspace MX records added]

Step 4: Update the SPF record

  1. In Zone Editor, locate existing TXT records starting with v=spf.
  2. Delete the existing SPF record.
  3. Add a new TXT record with the following value:
v=spf1 include:_spf.google.com ~all
  1. Save the record.

[Screenshot placeholder: SPF TXT record configuration]

Step 5: Set email routing to remote

  1. Open the Tools page in cPanel.
  2. In the Email section, click Email Routing.
  3. Select the domain.
  4. Choose Remote Mail Exchanger.
  5. Click Change.

[Screenshot placeholder: Email Routing set to Remote Mail Exchanger]

DNS propagation can take up to 24 hours. Email delivery begins once propagation is complete.

Reverting back to cPanel email

To stop using Google Workspace:

  • Remove the Google Workspace MX records.
  • Restore the previous MX records.
  • Restore the previous SPF record.
  • Change email routing back to Local Mail Exchanger.

After reverting, email accounts are managed again through cPanel.

Deliverability considerations

When routing email through external providers, proper DNS alignment is critical. For additional filtering and reputation control, services such as SpamExperts can improve mail reliability. Domains with multiple services or advanced routing requirements may benefit from infrastructure like cloud servers.

Was this article helpful?