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.
Overviewsection
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?section
| 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 Checklistsection
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)section
Works with any email provider that supports IMAP: GoDaddy, Rackspace, Zoho, Hostinger, cPanel, etc.
What migratessection
- Email messages and folders
- Read/unread status
What does NOT migratesection
- 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 providersection
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 filesection
Create a CSV with every mailbox to migrate:
EmailAddress,UserName,Password
user1@yourdomain.com,user1@yourdomain.com,OldPassword1
user2@yourdomain.com,user2@yourdomain.com,OldPassword2
Step 3 — Run the migration in Exchange admin centersection
- 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 progresssection
The migration dashboard shows per-mailbox status. Large mailboxes (10GB+) can take several hours.
Step 5 — Switch MX recordssection
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 migrationsection
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 Migrationsection
Microsoft has a dedicated tool for migrating from Google Workspace.
Step 1 — Grant migration accesssection
- 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 migrationsection
- 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)section
For organisations running on-premises Exchange Server with fewer than 150 mailboxes.
What migratessection
- All email, contacts, and calendar items
- Distribution groups
- Mailbox permissions
Step 1 — Configure Outlook Anywheresection
Ensure Outlook Anywhere (RPC over HTTP) is enabled on your on-premises Exchange server.
Step 2 — Run the migrationsection
- 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 MXsection
Same process as IMAP migration — verify all mailboxes are synced, then update MX records.
Post-Migration Steps (Critical)section
1. Update DNS recordssection
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:dmarc@yourdomain.com | 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 aliasessection
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 "sales@yourdomain.com"
Add-DistributionGroupMember -Identity "Sales Team" -Member "user1@yourdomain.com"
3. Set up shared mailboxessection
# Create a shared mailbox
New-Mailbox -Shared -Name "Support" -PrimarySmtpAddress "support@yourdomain.com"
Add-MailboxPermission -Identity "support@yourdomain.com" -User "user1@yourdomain.com" -AccessRights FullAccess
4. Configure Outlook on user devicessection
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 featuressection
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 serversection
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
Troubleshootingsection
| 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?
