๐Ÿ“˜Setup Google GSuite w/ cPanel

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:

  1. Log into cPanel.
  2. Go to Zone Editor โ†’ Click Manage next to your domain.
  3. Delete any existing MX records.
  4. Add the following MX records:
PriorityDestination
1ASPMX.L.GOOGLE.COM.
5ALT1.ASPMX.L.GOOGLE.COM.
5ALT2.ASPMX.L.GOOGLE.COM.
10ALT3.ASPMX.L.GOOGLE.COM.
10ALT4.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:

  1. In Zone Editor, click Manage for your domain.
  2. Click Add Record:
    • Type: CNAME
    • Name: mail
    • Record: ghs.google.com
    • TTL: Auto

โœ… 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:

  1. Login to Gmail.com as the destination Google account.
  2. Go to Settings (gear icon) โ†’ See all settings โ†’ Accounts and Import.
  3. Under Check mail from other accounts, click Add a mail account.
  4. 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

  1. Log into your Gmail/Google Workspace email.
  2. Click the gear icon โ†’ See all settings.
  3. Navigate to the Forwarding and POP/IMAP tab.
  4. Under IMAP Access, choose Enable IMAP.
  5. 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)

  1. Login to your Google Admin Console:
    ๐Ÿ‘‰ https://admin.google.com
  2. Go to:
    Apps โ†’ Google Workspace โ†’ Gmail โ†’ Data Migration
  3. Click SET UP DATA MIGRATION.
  4. 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
  5. Provide the source email address, password, and destination Gmail address.
  6. Choose what to migrate:
    • Email only
    • Specify date range (optional)
    • Include deleted/spam folders (optional)
  7. 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.

Scroll to Top