This guide helps you configure Google Workspace (formerly G Suite) email for your domain using cPanel, including optional POP3 importing settings and required DNS records.
โ Step 1: Update MX Records in cPanel
To use Gmail for your domain email, update your MX records in cPanel:
- Log into cPanel.
- Go to Zone Editor โ Click Manage next to your domain.
- Delete any existing MX records.
- Add the following MX records:
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. |
Note: Ensure your domain’s email routing is set to Remote Mail Exchanger under Email Routing.
โ Step 2: Add CNAME for Webmail Access (Optional)
To set up a CNAME that allows users to access mail via a custom subdomain like mail.yourdomain.com
:
- In Zone Editor, click Manage for your domain.
- Click Add Record:
- Type:
CNAME
- Name:
mail
- Record:
ghs.google.com
- TTL:
Auto
- Type:
โ Step 3: (Optional) Enable POP3 Import in Gmail
If you’re importing emails from a cPanel server to Gmail (using POP3 method):
Gmail POP3 Settings:
- Hostname:
pop.gmail.com
- Port:
995
- Username:
[email protected]
- Password:
<enter your password>
- Use SSL: โ Enabled
- Leave a copy on server: Optional (uncheck to auto-delete after import)
Gmail Setup Instructions:
- Login to Gmail.com as the destination Google account.
- Go to Settings (gear icon) โ See all settings โ Accounts and Import.
- Under Check mail from other accounts, click Add a mail account.
- Enter your full email address, and follow the prompts using the settings above.
โ Step 4: (Optional) SPF, DKIM & DMARC Setup
To prevent spoofing and improve email deliverability, set the following in Zone Editor:
SPF (TXT Record):
Name: @
Type: TXT
Value: v=spf1 include:_spf.google.com ~all
DKIM:
Enable DKIM from Google Admin Console โ Apps โ Google Workspace โ Gmail โ Authenticate Email, and publish the TXT record provided by Google.
DMARC:
(Optional but recommended)
Name: _dmarc
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:[email protected]
๐ Important Notes
- DNS changes may take up to 24 hours to fully propagate.
- If migrating from cPanel email, you may use Googleโs Data Migration Tool or third-party tools like IMAPSYNC or POP3 import.
Here’s the IMAP-based version of the import section, added to the original guide:
๐ (Optional) IMAP Import โ Migrate Emails from cPanel to GSuite
If your email is currently hosted on a cPanel server and you want to import all messages (with folder structure) to Gmail, use IMAP-based migration. This method is more powerful and flexible than POP3.
โ Step 1: Enable IMAP in Gmail
- Log into your Gmail/Google Workspace email.
- Click the gear icon โ See all settings.
- Navigate to the Forwarding and POP/IMAP tab.
- Under IMAP Access, choose Enable IMAP.
- Click Save Changes.
โ Step 2: Prepare IMAP Settings of cPanel Email
Youโll need the current mailboxโs IMAP details (from the cPanel server):
- IMAP Server: yourdomain.com or mail.yourdomain.com
- IMAP Port: 993 (SSL)
- Username: full email address (e.g., [email protected])
- Password: the mailbox password
- Encryption: SSL/TLS
Test login using an external IMAP mail client (like Thunderbird or Outlook) if needed.
โ Step 3: Use Googleโs Data Migration Tool (Recommended)
- Login to your Google Admin Console:
๐ https://admin.google.com - Go to:
Apps โ Google Workspace โ Gmail โ Data Migration - Click SET UP DATA MIGRATION.
- Choose:
- Migration Source: Other IMAP server
- Connection Protocol: IMAP
- IMAP Server Name: yourdomain.com or mail.yourdomain.com
- Port: 993
- Role account (if required): Enter full credentials of the source mailbox
- Provide the source email address, password, and destination Gmail address.
- Choose what to migrate:
- Email only
- Specify date range (optional)
- Include deleted/spam folders (optional)
- Click Start to begin the migration.
You can monitor progress in the Migration status dashboard.
๐ Alternative: Use IMAPSYNC (for advanced users)
If you donโt want to use Googleโs built-in tool, you can use IMAPSYNC from your cPanel server via CLI:
imapsync --host1 mail.yourdomain.com --user1 [email protected] --password1 'oldpassword' \
--host2 imap.gmail.com --user2 [email protected] --password2 'newgmailpassword' \
--ssl1 --ssl2
Requires installation of imapsync
.