Xpoudy

How to Set Up Microsoft 365 MX Records in Cloudflare

Short answer

Copy the MX target for your custom domain from the Microsoft 365 admin center and add it to your Cloudflare DNS zone. Use the priority Microsoft specifies and verify the exact target publicly. During a provider switch, coordinate removal of old MX records with your mail administrator.

By Xpoudy ·

Find the domain’s assigned MX target

Open the domain in the Microsoft 365 admin center and view the DNS records for Exchange Online. Copy the assigned mail protection host. An example from another tenant cannot confirm your destination. In Cloudflare, verify the zone and the Name that should receive email. For a root custom domain, the Name is typically @.

Update the mailbox route at the planned time

FieldWhat to enter
TypeMX
NameThe hostname Microsoft asks to receive mail
Mail serverThe exact target from the Microsoft 365 admin center
PriorityThe priority shown in Microsoft’s instructions

If a security gateway must receive mail before Exchange Online, consult its connector and routing instructions. Preserve the agreed gateway route. If the new route goes directly to Microsoft, check for old MX records that could still accept messages.

Confirm the change with inbound mail

Run Xpoudy’s MX Lookup from the domain and verify the public target. Send an inbound test from another provider to a real internal address and a critical alias. Confirm a response reaches the outside inbox. After the mailbox works in Outlook, connect it to Xpoudy and run a separate send and reply test.