Migrate
Migrate cPanel Email to Gmail: Generic Workspace Plan
Move any cPanel-hosted mailbox to Gmail or Google Workspace over IMAP. Generic guide with MX cutover, Email Routing fix, and DKIM steps.
Dan Okafor
MSP Practice Lead
cPanel powers a huge slice of low-cost hosted mail, and the move to Google Workspace is one of the most common migrations an MSP sees. The mail itself copies cleanly over IMAP. The trap is the cPanel-side configuration: MX records live in DNS Zone Editor, but the internal "Email Routing" flag also has to be flipped to "Remote Mail Exchanger" or cPanel keeps delivering inbound mail to itself. Google's own Data Migration Service handles cPanel sources poorly, especially around throttling and resume. This guide is the version that finishes inside a weekend regardless of which hosting brand sells you the cPanel.
Skip the manual setup — let Mailbox Taxi handle it
One desktop app, every IMAP provider, zero data leaving your machine.
What cPanel email actually is
cPanel is a Linux server management UI from cPanel L.L.C., bundled by Bluehost, HostGator, A2 Hosting, SiteGround, Namecheap shared hosting, and thousands of smaller regional providers. The mail stack underneath is always the same:
- Postfix or Exim for SMTP
- Dovecot for IMAP/POP3
- Roundcube and/or Horde as webmail
- cPanel UI for management
From the outside, every cPanel mail account looks identical:
- IMAP on
mail.yourdomain.comport 993 SSL - SMTP on the same host port 465 SSL or 587 STARTTLS
- Webmail via the cPanel webmail subdomain (usually
webmail.yourdomain.com)
What changes between hosts is the cPanel version, the UI layout, the per-IP IMAP throttling threshold, and the level of customer support you'll get when something goes wrong. The mechanics of migration are identical.
Inventory before anything
In cPanel, walk through and capture:
- Email, Email Accounts — every mailbox with current size and quota
- Email, Forwarders — every mail forwarder (one-to-one and one-to-many)
- Email, Email Filters — per-account filter rules
- Email, Autoresponders — vacation messages set on individual mailboxes
- Email, Mailing Lists — distribution lists, where present
- Email, Default Address — the catch-all
Spreadsheet it. You will use this to provision Workspace users, recreate forwarders as aliases or groups, and verify post-cutover counts. The most common cause of "where did this email go" tickets weeks after cutover is a forwarder that was never recreated on the Google side.
Forwarders aren't mailboxes
cPanel forwarders are mail redirects, not mailboxes. There's nothing to migrate over IMAP because no mail is stored under the forwarder address; it's relayed at receive time to a different mailbox. Recreate them as Google Workspace aliases (one-to-one) or Google Groups (one-to-many) before MX cutover. Forgetting this is the single biggest source of post-cutover support tickets.
Provision Google Workspace
In the Workspace admin console:
- Verify your domain. Google provides a TXT record. Add it inside cPanel, Domains, DNS Zone Editor. Verification usually completes within 30 minutes.
- Buy seats. Buy one more than the user count to cover the catch-all and any service account.
- Create each user. Match the primary email address exactly to the cPanel source.
- Create Google Groups for any cPanel mailing lists. Add the same members.
- Add Workspace aliases mirroring cPanel one-to-one aliases and forwarders.
For IMAP authentication into Gmail during migration, two options:
- Per-user app passwords: turn on IMAP in each Gmail user's settings, generate app passwords. Tedious past 10 users.
- OAuth with service account and domain-wide delegation: configure once in Google Cloud Console, authorise the migration scope, the tool impersonates each user during copy. Use this for anything non-trivial.
The migration plan
Lower MX TTL in cPanel
cPanel, Domains, DNS Zone Editor. Edit the MX. Drop TTL to 300 seconds. Save. Wait 24 hours so global resolvers update.
Reset mailbox passwords if needed
From cPanel, Email Accounts, set or reset each mailbox password. You need these for the migration tool to authenticate against cPanel IMAP. Store securely; rotate after cutover.
Pre-stage the bulk copy
Start the cPanel-to-Gmail IMAP migration. Users keep working on cPanel. Expect 1 to 2 GB per hour at five concurrent workers per mailbox. cPanel shared IMAP servers throttle around 10 concurrent connections per source IP.
User communication
Two days out, send a one-paragraph note: change is happening, addresses stay the same, historical mail will already be in the new mailbox, here are the client setup steps for cutover day.
Flip public MX in cPanel DNS
cPanel, Domains, DNS Zone Editor. Replace existing MX with Google's five hosts:
ASPMX.L.GOOGLE.COMpriority 1ALT1.ASPMX.L.GOOGLE.COMpriority 5ALT2.ASPMX.L.GOOGLE.COMpriority 5ALT3.ASPMX.L.GOOGLE.COMpriority 10ALT4.ASPMX.L.GOOGLE.COMpriority 10
Save.
Change Email Routing to Remote
cPanel, Email, Email Routing. Select your domain. Change from "Local Mail Exchanger" or "Automatically Detect Configuration" to "Remote Mail Exchanger". Save.
This is the cPanel-specific gotcha. Without this change, cPanel keeps delivering inbound mail to its own Maildir even though public MX points at Google. Symptom: external senders see "delivered" but no mail appears in Gmail.
Run delta sync
Immediately after MX flip and Email Routing change, run a delta pass from cPanel to Gmail. Catches messages that arrived during the cutover window.
Update SPF, DKIM, DMARC
SPF in cPanel DNS:
v=spf1 include:_spf.google.com ~allDKIM in Workspace admin: Apps, Google Workspace, Gmail, Authenticate email. Generate the key, add it as TXT at
google._domainkey.yourdomainin cPanel DNS.DMARC: start with
v=DMARC1; p=none; rua=mailto:dmarc@yourdomainif you don't have one already.Reconfigure clients
Walk users through removing the cPanel account from their mail client and adding the Workspace account. Workspace auto-configures from email and password on Outlook 2019+, Apple Mail, and most mobile clients.
Why Email Routing is the most common cutover failure
cPanel's Exim mail server uses two signals to decide what to do with inbound mail:
- The MX record (queried from public DNS)
- The internal Email Routing setting in cPanel
If MX points externally but Email Routing is still "Local Mail Exchanger" or "Automatic", Exim sees that local Maildirs exist for the domain and delivers to them anyway. The sender's mail server gets a successful response. The mail piles up on the cPanel server. Nothing appears in Gmail. The admin assumes the migration is broken when actually the cPanel-side flag was never set.
The fix:
- cPanel, Email, Email Routing.
- Select the domain.
- "Remote Mail Exchanger".
- Save.
Verify with a test message from an external Gmail account. Headers on the received message should reference aspmx.l.google.com or a Google IP, not any cPanel hostname.
Tip
After every DNS change (MX flip, Email Routing change, SPF update, DKIM publish), run a quick test: send from an external Gmail to a migrated mailbox, watch headers, confirm it lands. Each test takes 30 seconds and catches misconfigurations immediately rather than days later when users complain.
Gmail behaviour after migration
A few Gmail quirks coming from cPanel webmail (Roundcube or Horde):
- Folders become labels. A cPanel folder
Clients/Acmeis now a Gmail label of the same nested name. Messages can hold multiple labels simultaneously. - Conversation threading. Gmail groups messages by subject and headers into threads. Users coming from Roundcube find this jarring at first. They can turn it off in Gmail settings.
- All Mail. Gmail keeps every message in a special "All Mail" label regardless of folder. Use this for total-count verification.
- Sent and Drafts. Map automatically to Gmail's system labels of the same name.
- Spam. Gmail's spam filter is much more aggressive than cPanel's default. Expect users to find legitimate mail in spam during the first week and need to mark "Not Spam".
Errors during the IMAP copy
Too many simultaneous connectionsfrom cPanel. Drop to five workers per mailbox. Most cPanel hosts throttle around 10 connections per source IP.AUTHENTICATIONFAILEDagainst cPanel. Username must be full email; password must match cPanel exactly.Connection unexpectedly closed. cPanel hosts kill long IMAP sessions after about 30 minutes. Use a migration tool that auto-reconnects and resumes.OAuth2 token expiredagainst Gmail. Migration scope refresh tokens expire after seven days idle. Refresh before resuming if paused.Lookup failedagainst Gmail. Destination mailbox hasn't finished provisioning. Wait 5 to 30 minutes for new Workspace mailboxes.Message too large for destination. Gmail allows up to 50 MB inbound over IMAP. Larger messages need a one-off MBOX export and manual import.Folder UTF-7 conversion error. Uncommon on cPanel but possible if Roundcube users created folders with accented characters.
Where Mailbox Taxi fits
Mailbox Taxi runs on your laptop and treats cPanel IMAP and Gmail as two standard endpoints. It auto-reconnects on cPanel session timeouts, deduplicates cross-folder messages correctly on the Gmail side, and keeps a per-message manifest for resumable delta passes. If you would rather see the Microsoft destination, the cPanel to Office 365 walkthrough covers the same source. If your specific cPanel host is Bluehost, see the Bluehost to Gmail guide. For HostGator, see the HostGator to Gmail guide. For a fully generic IMAP source, the IMAP to Gmail walkthrough covers the source-agnostic mechanics. And the broader Google Workspace migration playbook covers Workspace tenant setup, SSO, and security baselines.
Validation in the first hour
After MX cutover and Email Routing change:
- Inbound test: external Gmail to a migrated mailbox. Should land in Workspace inbox within 30 seconds.
- Outbound test: from Workspace to external. Headers should show SPF pass and DKIM signature from Google.
- DNS:
dig MX yourdomainshould return Google's five MX hosts. - Folder verification: sample three mailboxes (heavy, light, shared). Compare cPanel folder counts to Gmail labels plus All Mail count. Within 1% is acceptable.
- Workspace client test: add the account to a fresh Outlook profile. Should auto-configure without manual server entry.
Decommissioning cPanel email
Keep cPanel mailboxes paid and reachable for 30 days post-cutover. During the window:
- Verify reliable inbound mail flow to Workspace
- Catch any forwarder, alias, or mailing list missed
- Confirm every client device is reconfigured
After 30 days, the cPanel email piece can be effectively decommissioned. If the cPanel subscription includes hosting for a website that stays, only the email feature is being abandoned. Delete the Maildir on the cPanel side as a final cleanup. The domain itself can stay at the same registrar or move separately; that's a different decision.
Migrate your mailbox the easy way
Join the waitlist for early access and lock in launch pricing.
Related reading
migrate
Migrate cPanel Email to Office 365: Generic IMAP Plan
Move any cPanel-hosted mailbox to Office 365 over IMAP. Generic guide for IT admins covering MX, Email Routing, SPF, DKIM, and validation.
migrate
How to Migrate from IMAP to Gmail
Migrate IMAP mailboxes to Gmail or Google Workspace: Data Migration Service setup, app passwords, throttling and label-vs-folder behavior.
migrate
Migrate Bluehost to Gmail: cPanel to Google Workspace Plan
Move Bluehost cPanel email to Gmail or Google Workspace over IMAP. Step-by-step plan with MX cutover, DKIM, and validation for IT admins.
migrate
Migrate HostGator to Gmail: cPanel to Google Workspace
Move HostGator cPanel email to Gmail or Google Workspace over IMAP. Admin guide with MX cutover, Email Routing, and DKIM steps for clean delivery.
blog
Google Workspace Migration: A Complete Guide
A google workspace migration guide for IT admins: data migration service vs third-party, OAuth, label semantics, throttling, and cutover validation.
Migrate your mailbox the easy way
Join the waitlist for early access and lock in launch pricing.