According to recent reports, to migrate a cPanel domain to Microsoft 365, you create licensed mailboxes, copy each cPanel mailbox with an IMAP migration batch, and then point the domain's MX record at Microsoft 365. If everyone cannot move on the same day, you set up split delivery first so that mail for the domain reaches whichever system holds the mailbox. Only mail moves; contacts, calendars and tasks do not, and the MX record stays untouched until the last step is tested.

It has been revealed that updated 22 Nov 2026: the split-delivery steps were corrected after a hands-on test. The first version used a mail flow rule ("recipient is Outside the organization" and recipient domain is the shared domain) with a rule-scoped Partner connector; on a live tenant that rule never matched, and mail to cPanel-only addresses bounced with 554 5.4.14 Hop count exceeded - possible mail loop. The guide now uses an On-premises connector used only when email is sent to the domain, which delivered to the cPanel server in the same test. If you built the earlier version, see "Convert a rule-based setup" below. (Related: Latest Update: Transformer-based Encoder-Decoder Models...)

Industry observers note that this guide is for administrators of a small or mid-sized organization whose email lives on cPanel hosting and who are moving to Exchange Online. It covers one domain, either moved in a single weekend or in phases. By the end you will have:. (Related: Industry News: Block Sparse Matrices for Smaller and Fa...)

It has been revealed that the generic mechanics of an IMAP batch (CSV columns, endpoint options, throttling) are in the IMAP to Exchange Online migration guide; this article does not repeat them line by line. It adds the cPanel-specific plan, the phased route, the cutover order and the cleanup. The email migration cutover checklist is a good companion for the DNS day.

Placeholders used throughout: example.com is your domain, admin@example.com is the Microsoft 365 admin, yourtenant.onmicrosoft.com is the tenant's default domain, mail.example.com is the cPanel mail host, and 203.0.113.10 is the IP address the cPanel server sends mail from (on shared hosting this can differ from the address of mail.example.com).

Recent findings suggest that if you can do one cutover, do it: it has fewer moving parts. The phased route in the section "Phased moves with split delivery" is the same migration plus a routing layer.

Before touching Microsoft 365, write down what exists on the cPanel side.

In a recent development, leave the MX record pointing at cPanel. Do not add the Microsoft 365 MX, SPF or autodiscover records yet.

In a recent development, in cPanel, open the mail client settings for any mailbox (under Email > Email Accounts). Use the incoming server name shown for the secure SSL/TLS settings and IMAP port 993. The migration endpoint in the next step needs exactly that name, for example mail.example.com.

The CSV needs EmailAddress, UserName and Password. Attributes cannot contain spaces. You have three ways to get working credentials:.

The CSV is a list of working passwords. Store it somewhere restricted and delete it, and the temporary cPanel passwords, when the migration is done. If the file has non-ASCII characters, save it as UTF-8.

In a recent development, connect to Exchange Online PowerShell, test the source, then create the endpoint and batch. Use a small test batch of two or three mailboxes first.

Recent findings suggest that the same steps exist in the Exchange admin center under Migration: Endpoints > Add > IMAP, then Add migration batch > Migrate to Exchange Online > IMAP migration, selecting your endpoint and importing the CSV on Add user mailboxes. Check the real folder names in a mail client before you exclude any, because they differ between hosts.

Sources indicate that microsoft's migration user status documentation describes these states: Queued (batch running, user not started, typically because all endpoint connections are busy), Synced (initial sync done; for IMAP it can also mean an incremental sync succeeded), Failed (provisioning or the initial sync failed), and Completed. In the Exchange admin center, select the batch under Migration and use View details in the details pane for the per-user report, where Stop migration and Resume migration appear depending on the user's status.

According to recent reports, the per-user report is a plain list of events. Microsoft does not document each line, so treat this as practical interpretation, not a specification:.

Worry about a Failed status with an Error text (usually a wrong or changed password, or a blocked connection), repeated connection errors in the report (network or the host's connection limits), and a non-zero SkippedItemCount (items over 35 MB or beyond the item limit). Add -IncludeSkippedItems to see which items were skipped. The stuck migration batch article covers slow batches.

In a recent development, split delivery lets one domain live on two systems. Mail enters through Microsoft 365 (the MX record points there), and a recipient that exists in Exchange Online is delivered there; any other recipient in that domain is relayed to cPanel. Microsoft's mail flow guidance recommends pointing MX at Microsoft 365 for the most accurate spam filtering when mailboxes are in two places.

The three steps, in the order to do them:.

Do all three and test before you change MX. The Microsoft 365 split delivery guide covers other second hosts (Google Workspace, Zoho), the reverse direction and a longer troubleshooting table.

Recent findings suggest that microsoft defines Authoritative as delivering to listed recipients and rejecting unknown ones. Internal relay delivers to known recipients in Microsoft 365 and relays unknown ones to your own server, and requires a connector to that server. In the Exchange admin center go to Mail flow > Accepted domains, select example.com, and under This accepted domain is choose Internal relay, then Save. In PowerShell:.

Industry observers note that in Mail flow > Connectors, select + Add a connector and set Connection from to Office 365 and Connection to to Your organization's email server. That makes an On-premises connector, which Microsoft describes as one that "services domains that are used by your on-premises organization"; Partner organization is for domains external to your organization, which example.com is not. Then:.

Recent findings suggest that -RecipientDomains example.com makes the connector apply only to mail for your domain, -UseMXRecord $false sends it to the smart host instead of following MX (which would point back to Microsoft 365 after the cutover), and -IsTransportRuleScoped $false means no rule is involved. -TlsSettings EncryptionOnly encrypts the channel without certificate authentication; CertificateValidation and DomainValidation (with -TlsDomain) are stricter and are better if the cPanel server has a valid certificate for its name.

Why this works: a recipient with a mailbox, or any other recipient object, in Microsoft 365 is delivered inside the tenant and never reaches the connector. Only a recipient that Microsoft 365 cannot resolve goes out, and because the address is in example.com, it matches the connector's recipient domain. Microsoft's connector page notes the service first picks "a connector that exactly matches the recipient domain.".

If you already built the rule version (a rule-scoped connector plus a rule that redirects to it), delete the rule first, then change the connector:.

Two things came up in the hands-on test. Changing the connector's scope while a rule still referenced it, even a disabled rule, failed with Error executing request. One or more transport rules are still referencing the specified connector.; deleting the rule fixed it. And the Exchange admin center did not offer a way to change an existing connector from Partner organization to Your organization's email server, so use Set-OutboundConnector -ConnectorType OnPremises or create a new connector.

Sources indicate that A rule with The recipient is located > Outside the organization plus recipient domain is example.com looks like the obvious way to catch cPanel people, but Microsoft's definitions rule it out. The mail flow rule conditions page notes a recipient is inside the organization if "The recipient's email address is in an accepted domain that's configured as an authoritative domain or in an internal relay domain, and the message was sent or received over an authenticated connection", and outside only if the address "isn't in an accepted domain" or is in an external relay domain. An Internal relay domain is an accepted domain, so the rule never matches. In the hands-on test the mail then followed the MX record, which pointed back at Microsoft 365, and bounced with 554 5.4.14 Hop count exceeded - possible mail loop; every hop in the bounce was an outlook.com server and nothing reached cPanel, even after 30 minutes. The domain-scoped connector avoids the problem because it matches on the recipient domain.

Send from a Microsoft 365 user to a cPanel-only user: it must arrive in cPanel webmail, and the message trace (see Message trace in Exchange Online) must show it leaving through the To cPanel connector. Check the trace, not just arrival: while MX still points at cPanel, mail can arrive by ordinary MX routing even when no connector matched. Then send from cPanel to a moved user and confirm it arrives in Microsoft 365 through the forwarder. The Exchange Online connectors guide explains the connector objects used here.

Do this once the batch has synced and, if phased, the test above passed.

On shared hosting, the IP address the server sends mail from can differ from the address mail.example.com resolves to, so do not copy the IP from DNS. In cPanel open Email > Email Deliverability, click Manage for the domain, and read the IP in the Suggested "SPF" (TXT) Record; cPanel states it automatically includes the server's main IPv4 or IPv6 addresses there. If that address is 203.0.113.10, the record is:.

ip4: authorizes the cPanel server, the include authorizes Microsoft 365, and ~all soft-fails everything else. Microsoft allows only one SPF record per domain and notes multiple records cause permerror, so edit the existing record instead of adding a second one (cPanel may already have published one). Receivers also stop at 10 DNS lookups: counted the way Microsoft documents it, ip4: and all cost nothing, each include: costs one plus whatever is nested inside it, and a or mx cost one each. This record uses one direct lookup. Once nothing else sends mail, tighten to v=spf1 include:spf.protection.outlook.com -all, Microsoft's recommended form.

It has been revealed that after the MX change, send from an outside account such as Gmail to a moved user and to a cPanel-only user. Both must arrive, the message trace should show the cPanel message leaving through the To cPanel connector, and the outside sender should not get a BoxTrapper challenge. The SPF, DKIM and DMARC setup guide covers the policy side.

During coexistence both systems send mail as your domain, so both need to authenticate. For Microsoft 365, publish the two CNAME records Microsoft documents, with hostnames selector1._domainkey and selector2._domainkey, pointing to the values from your tenant:.

If the cPanel server already signs mail, its key sits under its own selector name, so check the existing DNS TXT records before you add records. Start DMARC at a monitoring policy and review reports before you tighten it, as Microsoft advises for complex mail sources.

Recent findings suggest that for clients, latest Outlook profiles use autodiscover. Remove old IMAP accounts from phones and Outlook, add the Microsoft 365 account, and let it download mail. Consumers also need their contacts and calendars moved by hand, since the IMAP migration does not carry them.

Industry observers note that this guide was researched and drafted with AI assistance and checked against the vendor documentation listed in its References. Read the maintained version and related guides on EpiFive.

→ Read original article