How to Migrate Email to Microsoft 365
A step-by-step guide to migrating email from any provider to Microsoft 365 Exchange Online. Covers cutover migration, staged migration, and IMAP migration methods.
Overview
Migrating email to Microsoft 365 is one of the most common projects for businesses moving to the cloud. The process varies depending on your current email provider, but Microsoft provides built-in tools that handle most of the heavy lifting.
This guide covers the three main migration methods, when to use each, and the critical DNS and security steps after migration.
Which Migration Method Should You Use?
| Current Provider | Method | Best For |
|---|---|---|
| On-premises Exchange Server | Cutover migration | Under 150 mailboxes, migrate all at once |
| On-premises Exchange Server | Staged migration | Over 150 mailboxes, migrate in batches |
| Google Workspace (Gmail) | Google Workspace migration | Built-in tool in M365 admin center |
| Any IMAP provider (GoDaddy, Rackspace, Zoho, etc.) | IMAP migration | Works with any email provider that supports IMAP |
| Another Microsoft 365 tenant | Cross-tenant migration | Mergers, acquisitions, rebranding |
Pre-Migration Checklist
Before starting any migration:
- Verify licences — every user needs a Microsoft 365 licence with Exchange Online
- Add your domain to Microsoft 365 (admin.microsoft.com > Settings > Domains)
- Verify the domain via DNS TXT record
- Create user accounts in Microsoft 365 (or sync from AD via Entra Connect)
- Document current settings — distribution lists, aliases, forwarding rules, shared mailboxes
- Communicate to users — set expectations for downtime and what they need to do
Do NOT change your domain's MX record until migration is complete and verified. Changing MX prematurely will route new email to Microsoft 365 before mailboxes are ready, causing bounced messages.
Method 1: IMAP Migration (Most Common)
Works with any email provider that supports IMAP: GoDaddy, Rackspace, Zoho, Hostinger, cPanel, etc.
What migrates
- Email messages and folders
- Read/unread status
What does NOT migrate
- Contacts and calendars (must be exported/imported separately)
- Email rules and signatures
- Sent items (on some IMAP servers)
Step 1 — Verify IMAP access with your current provider
You need the IMAP server address and port:
| Provider | IMAP Server | Port |
|---|---|---|
| GoDaddy | imap.secureserver.net | 993 |
| Rackspace | secure.emailsrvr.com | 993 |
| Zoho | imap.zoho.com | 993 |
| Generic cPanel | mail.yourdomain.com | 993 |
| Google Workspace | imap.gmail.com | 993 |
Step 2 — Create a migration CSV file
Create a CSV with every mailbox to migrate:
EmailAddress,UserName,Password
[email protected],[email protected],OldPassword1
[email protected],[email protected],OldPassword2
Step 3 — Run the migration in Exchange admin center
- Go to admin.exchange.microsoft.com > Migration
- Click Add migration batch
- Select Migration to Exchange Online > IMAP migration
- Upload your CSV file
- Enter the IMAP server address and port (993, SSL)
- Set the batch name and start the migration
Step 4 — Monitor progress
The migration dashboard shows per-mailbox status. Large mailboxes (10GB+) can take several hours.
Step 5 — Switch MX records
Once all mailboxes show "Synced", update your DNS:
- Change your MX record to point to Microsoft 365:
- Priority: 0
- Host: @
- Points to:
yourdomain-com.mail.protection.outlook.com
- Wait for DNS propagation (up to 48 hours, usually 1-4 hours)
- Verify mail flow by sending test emails
Step 6 — Complete the migration
After verifying mail flow works correctly:
- Go back to the migration batch in Exchange admin center
- Click Complete to finalise the batch
- This stops syncing from the old server
Method 2: Google Workspace Migration
Microsoft has a dedicated tool for migrating from Google Workspace.
Step 1 — Grant migration access
- In Google Admin Console, create a service account with domain-wide delegation
- Grant the following API scopes:
https://mail.google.com/https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/contacts
Step 2 — Run the migration
- Go to admin.microsoft.com > Setup > Data migration
- Select Gmail as the source
- Enter the Google Workspace service account credentials
- Select which users to migrate
- Choose what to migrate: Email, Contacts, Calendar (all three recommended)
- Start the migration
The Google Workspace migration tool is the only built-in method that migrates contacts and calendars in addition to email. For other providers, you will need to export contacts as a CSV and calendars as ICS files and import them separately.
Method 3: Cutover Migration (from Exchange Server)
For organisations running on-premises Exchange Server with fewer than 150 mailboxes.
What migrates
- All email, contacts, and calendar items
- Distribution groups
- Mailbox permissions
Step 1 — Configure Outlook Anywhere
Ensure Outlook Anywhere (RPC over HTTP) is enabled on your on-premises Exchange server.
Step 2 — Run the migration
- Go to admin.exchange.microsoft.com > Migration
- Click Add migration batch > Migration to Exchange Online > Cutover migration
- Enter your on-premises Exchange server details
- Microsoft 365 will discover all mailboxes automatically
- Start the migration
Step 3 — Verify and switch MX
Same process as IMAP migration — verify all mailboxes are synced, then update MX records.
Post-Migration Steps (Critical)
1. Update DNS records
After switching MX, also configure:
| Record | Type | Purpose |
|---|---|---|
| MX | Points to *.mail.protection.outlook.com | Routes email to Microsoft 365 |
| SPF | TXT: v=spf1 include:spf.protection.outlook.com -all | Authorises M365 to send email |
| DKIM | CNAME (two selector records) | Signs outgoing email cryptographically |
| DMARC | TXT: v=DMARC1; p=none; rua=mailto:[email protected] | Email authentication policy |
| Autodiscover | CNAME → autodiscover.outlook.com | Outlook auto-configuration |
See our full SPF/DKIM/DMARC guide for detailed setup.
2. Recreate distribution groups and aliases
IMAP and Google migrations do not migrate distribution lists. Recreate them in Exchange admin center or via PowerShell:
# Create a distribution group
New-DistributionGroup -Name "Sales Team" -Alias "sales" -PrimarySmtpAddress "[email protected]"
Add-DistributionGroupMember -Identity "Sales Team" -Member "[email protected]"
3. Set up shared mailboxes
# Create a shared mailbox
New-Mailbox -Shared -Name "Support" -PrimarySmtpAddress "[email protected]"
Add-MailboxPermission -Identity "[email protected]" -User "[email protected]" -AccessRights FullAccess
4. Configure Outlook on user devices
After MX switch, users may need to:
- Create a new Outlook profile (recommended for cleanest setup)
- Or clear cached credentials and restart Outlook
See our Outlook troubleshooting guide if users have connectivity issues.
5. Enable security features
Now that email is on Microsoft 365, enable:
- MFA for all users — MFA setup guide
- Conditional Access — CA guide
- Microsoft Defender for Office 365 — Safe Links, Safe Attachments, anti-phishing policies
- Audit logging — enabled by default, verify in Purview compliance portal
6. Decommission the old email server
Wait at least 30 days after migration before decommissioning the old server:
- Verify no email is still routing to the old server
- Export any remaining data (archives, public folders)
- Cancel the old email hosting subscription
- Remove old DNS records that pointed to the previous server
Troubleshooting
| Issue | Cause | Fix |
|---|---|---|
| "Migration failed: authentication error" | Wrong username or password in CSV | Verify credentials against the old provider |
| Migration stuck at "Syncing" | Large mailbox or throttling by source provider | Wait — large mailboxes take hours. Check migration log for specific errors |
| Email bouncing after MX change | MX record not fully propagated | Wait 4-48 hours, verify MX with nslookup -type=mx yourdomain.com |
| Outlook not connecting after migration | Cached credentials or Autodiscover pointing to old server | See our Outlook troubleshooting guide |
| Missing contacts/calendars | IMAP migration does not include contacts/calendars | Export as CSV/ICS from old provider and import into Outlook or M365 |
| Shared mailbox not accessible | Permissions not set | Grant FullAccess via Add-MailboxPermission |
Related Articles
Was this article helpful?
