Migrate
Migrate HostGator Email to Office 365: Step-by-Step Plan
Move HostGator cPanel mailboxes to Microsoft 365 over IMAP. Practical admin guide with MX cutover, Email Routing fix, and DKIM steps.
Alex Kerr
Lead Migration Engineer, Mailbox Taxi
HostGator email is the kind of bundled service most people end up with when they bought hosting years ago and email came along for free. It works until you have more than a handful of users, and then the lack of admin tooling, the basic spam filtering, and the small storage caps start to matter. Moving to Office 365 fixes all three, but HostGator is cPanel underneath, and the migration has cPanel-specific landmines that generic guides skip. This guide is written from the operational side: what to inventory, what to set, what breaks, and how to keep inbound mail flowing through cutover.
Skip the manual setup — let Mailbox Taxi handle it
One desktop app, every IMAP provider, zero data leaving your machine.
What HostGator email actually is
HostGator is shared cPanel hosting with email accounts as a feature. Each mailbox is a Maildir on a shared server, accessible by:
- IMAP on
mail.yourdomain.comor the shared host (e.g.gator####.hostgator.com) port 993 with SSL - SMTP on the same host port 465 with SSL or 587 with STARTTLS
- Webmail via the cPanel webmail link (Roundcube or Horde)
There is no migration API on the HostGator side. There is no admin-level "export everything" button. All mail movement happens over IMAP, and your role is to make that IMAP pipe reliable for as long as the bulk copy takes.
Inventory before anything else
Inside cPanel, pull from these panels:
- Email, Email Accounts — every mailbox, current size, quota
- Email, Forwarders — one-to-one or one-to-many mail forwarders
- Email, Email Filters — per-account filter rules
- Email, Autoresponders — vacation messages
- Email, Mailing Lists — distribution lists
- Email, Default Address — the catch-all setting
Save as a spreadsheet. You'll reuse this for provisioning Office 365 users and for verifying post-cutover counts. Most "we lost an inbox" tickets two weeks after cutover trace back to an inventory miss here.
Forwarders aren't mailboxes
HostGator's Forwarders panel holds one-to-one mail redirects with no underlying mailbox. They don't migrate with IMAP because there's nothing to migrate from. Recreate each as an Office 365 alias on the matching user, or as a mail-enabled distribution group if it forwards to multiple addresses.
Provision Office 365
In the Microsoft 365 admin centre:
- Verify your domain. Microsoft supplies a TXT record. Add it inside cPanel, Domains, DNS Zone Editor.
- Create each user mailbox. Match the SMTP address character-for-character to the HostGator source.
- Assign Exchange Online licences. Wait 15 to 60 minutes for provisioning to complete.
- Pre-create distribution groups for HostGator mailing lists.
- Pre-create aliases on each user to mirror HostGator aliases and forwarders.
For IMAP writes into Office 365, plan on OAuth2. Basic auth into Office 365 IMAP has been disabled by default since 2022; if your tool only supports basic auth, you'll need to grant the IMAP scope explicitly in Azure AD and re-enable it tenant-wide for the migration window (then disable again after).
The migration plan
Lower MX TTL in cPanel
cPanel, Domains, DNS Zone Editor. Edit the MX record. Drop TTL to 300 seconds. Save. Wait at least 24 hours so resolvers honour the shorter TTL.
Reset mailbox passwords
For each HostGator mailbox, set or reset the password from cPanel, Email Accounts, Manage. You need to know these to authenticate from the migration tool against HostGator IMAP. Store securely; you can rotate after cutover.
Pre-stage the bulk copy
Start the IMAP-to-IMAP migration from HostGator to Office 365. Users keep working on HostGator. Expect 1 to 2 GB per hour at around five concurrent workers per mailbox. Pushing higher trips HostGator's throttling.
Communicate the cutover
Two days before: send a short note. The change is happening, address stays the same, historical mail will already be in the new mailbox, here are the client setup steps.
Flip the MX record
cPanel, Domains, DNS Zone Editor. Edit the MX. Replace existing host (typically mail.yourdomain.com pointing at the HostGator shared server) with the Microsoft host shown in the Microsoft 365 admin centre. Format is yourdomain-com.mail.protection.outlook.com at priority 0.
Change Email Routing to Remote
cPanel, Email, Email Routing. Find your domain. Change from "Local Mail Exchanger" or "Automatically Detect Configuration" to "Remote Mail Exchanger". Save.
Without this change, HostGator will keep delivering inbound mail to its own local mailboxes even though the public MX says Microsoft. This is the single most common cause of "MX flipped but mail still going to old mailbox" tickets.
Run the delta sync
Within an hour of MX cutover, run a final delta pass. Catches messages that arrived at HostGator during the propagation window.
Update SPF and DKIM
SPF in cPanel DNS Zone Editor: replace HostGator's include with
include:spf.protection.outlook.com.DKIM in the Microsoft 365 Defender portal: enable DKIM signing. Microsoft generates two CNAME records. Add both to cPanel DNS. Without DKIM, outbound mail starts landing in spam within a week.
Reconfigure clients
Walk users through removing the HostGator account in their mail client and adding the Office 365 account. Outlook auto-discovers; Apple Mail and mobile prompt for OAuth.
The Email Routing trap
The most common cutover failure on HostGator is forgetting to change Email Routing. Public MX records on the internet point at Microsoft, but cPanel still thinks it should deliver mail locally because the Email Routing setting wasn't updated. Symptom: external senders send mail; nothing arrives in Office 365; nothing arrives anywhere visible to the admin; mail is actually piling up in the old HostGator Maildir.
After flipping MX:
- Open cPanel, Email, Email Routing.
- Select your domain.
- Set to "Remote Mail Exchanger".
- Save.
Verify by sending an external test message and checking headers. The first Received line should reference Microsoft's protection.outlook.com, not any HostGator or gator####.hostgator.com host.
Tip
Build a small test loop: send from a Gmail account, check it lands in Office 365 within 30 seconds, and verify the headers. Run this immediately after Email Routing change, again after SPF update, and again after DKIM publish. Three checks, ten minutes total.
Throttling and the errors you will see
HostGator's shared IMAP servers throttle per IP, and the threshold is around 10 concurrent connections per source IP across all mailboxes you're migrating from that account. Drop your worker count if you hit any of these:
Too many simultaneous connections— back off to five workers per mailbox total.AUTHENTICATIONFAILED— username must be the full email; password must be exactly what's in cPanel. Bad case-sensitivity is the most common cause.STARTTLS handshake failed— you're using port 143. Switch to 993 implicit SSL.Connection unexpectedly closed— HostGator kills long IMAP sessions around 30 minutes in. Use a migration tool that reconnects and resumes.Message too large for destination— Office 365 limits inbound to 150 MB; HostGator caps incoming to 50 MB. You're rarely hitting this from a HostGator source unless mail was forwarded in from elsewhere.Folder UTF-7 conversion error— rare on HostGator since most cPanel webmail uses ASCII folder names, but possible if a user manually created folders with accented characters.
Where Mailbox Taxi fits
Mailbox Taxi runs as a desktop app on Windows, Mac, or Linux. It connects to HostGator cPanel IMAP and Office 365, handles reconnection on HostGator's session timeouts, and keeps a per-message manifest so the delta pass after MX cutover only copies what is genuinely new. If you would rather move to Google, the HostGator to Gmail guide is the corresponding writeup. For a generic cPanel-source approach with no HostGator specifics, the cPanel to Office 365 walkthrough is shorter. The broader Office 365 migration playbook covers tenant licensing, retention, and the post-migration security baseline. And the generic IMAP to Office 365 guide is a useful read if you have multiple IMAP sources.
Validation in the first hour
After MX cutover and Email Routing change:
- Inbound test: external Gmail account sends to a migrated mailbox. Should arrive in Office 365 within 30 seconds.
- Outbound test: from Office 365 to external. Headers at recipient should show SPF pass and DKIM signature.
- DNS check:
dig MX yourdomainshould return the Microsoft host.dig TXT yourdomainshould show the updated SPF. - Folder verification: pick one heavy user, one light user, one shared mailbox. Compare HostGator IMAP folder counts to Office 365 folder counts. Within 1% is acceptable; bigger gaps need a second delta pass.
- Outlook autodiscover test: open Outlook on a test machine, enter only the email address. It should auto-configure to Office 365. If not, check the autodiscover CNAME in cPanel DNS.
For mechanics of what's happening at the DNS layer, the MX record glossary is the brief read.
Decommissioning HostGator email
Keep HostGator mailboxes paid and reachable for 30 days post-cutover. During that window:
- Confirm reliable inbound mail flow to Office 365
- Catch any unmigrated forwarder or alias
- Verify every client device is reconfigured to the new server
After 30 days, the HostGator email feature can be effectively abandoned. If you still need hosting for the website, keep the cPanel subscription; only the mail product needs decommissioning. Delete the Maildir on the cPanel side as final cleanup.
Migrate your mailbox the easy way
Join the waitlist for early access and lock in launch pricing.
Related reading
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.
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 Office 365
Step-by-step IMAP to Office 365 migration: EAC setup, CSV mapping file, throttling limits, cutover steps and the gotchas that bite admins.
blog
Office 365 Migration: The Definitive Playbook
A complete office 365 migration playbook for IT admins: discovery, batching, throttling, modern auth, cutover vs staged vs hybrid, and validation.
glossary
What Is an MX Record? The DNS Switch Behind Cutover
What is an MX record, how priorities and TTLs work, and why flipping the MX record is the moment mail actually moves to your new provider.
Migrate your mailbox the easy way
Join the waitlist for early access and lock in launch pricing.