📘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: info@yourdomain.com
  • 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 settingsAccounts 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 ConsoleAppsGoogle WorkspaceGmailAuthenticate Email, and publish the TXT record provided by Google.

DMARC:

(Optional but recommended)

Name: _dmarc  
Type: TXT  
Value: v=DMARC1; p=none; rua=mailto:postmaster@yourdomain.com

🔒 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 iconSee 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., info@yourdomain.com)
  • 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:
    AppsGoogle WorkspaceGmailData 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 info@yourdomain.com --password1 'oldpassword' \
         --host2 imap.gmail.com --user2 info@yourgsuitedomain.com --password2 'newgmailpassword' \
         --ssl1 --ssl2

Requires installation of imapsync.

Scroll to Top