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 omgevingen.
Stap 1: Create and verify a Google Workspace account
- Create a Google Workspace account for the domain.
- Access the Google Workspace admin console.
- Complete domain verification using one of the supported verification methods.
Google services remain inactive until domain verification is completed.
Stap 2: Remove existing MX records
- Log in to cPanel.
- Open the Tools pagina.
- In de Domeinen sectie, klikken Zone-editor.
- Locate the domain and click Beheren.
- Identify all existing MX records.
- Delete each existing MX record.
[Tijdelijke aanduiding voor screenshot: Zone Editor showing existing MX records]
Save the current DNS configuration before deleting records so it can be restored later if needed.
Stap 3: Add Google Workspace MX records
Primary MX record
- In Zone-editor, klikken Add MX Record.
- Set the zone name to the domain.
- Confirm TTL is set to 14400.
- Set Prioriteit naar 1.
- Set Destination based on signup date:
- Accounts created before April 2023:
aspmx.l.google.com - Accounts created after April 2023:
smtp.google.com
- Accounts created before April 2023:
- Save the record.
Additional MX records for older accounts
If the account was created before April 2023, add the following records:
- Prioriteit 5, Destination
alt1.aspmx.l.google.com - Prioriteit 5, Destination
alt2.aspmx.l.google.com - Prioriteit 10, Destination
alt3.aspmx.l.google.com - Prioriteit 10, Destination
alt4.aspmx.l.google.com
[Tijdelijke aanduiding voor screenshot: Google Workspace MX records added]
Stap 4: Update the SPF record
- In Zone-editor, locate existing TXT records starting with
v=spf. - Delete the existing SPF record.
- Add a new TXT record with the following value:
v=spf1 include:_spf.google.com ~all
- Save the record.
[Tijdelijke aanduiding voor screenshot: SPF TXT record configuration]
Stap 5: Set email routing to remote
- Open the Tools page in cPanel.
- In de E -mail sectie, klikken Email Routing.
- Select the domain.
- Kiezen Remote Mail Exchanger.
- Klikken Change.
[Tijdelijke aanduiding voor screenshot: Email Routing set to Remote Mail Exchanger]
DNS propagation can take up to 24 uur. 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.