Verify the custom domain's mail exchanger (MX) record
| Product family | Troubleshoot |
|---|---|
| Document source | Troubleshoot Exchange Onlinetoc |
| Guide type | Reference Guide |
| Skill level | Intermediate to advanced |
| Time | 15 - 60 minutes depending on environment |
This page documents Verify the custom domain's mail exchanger (MX) record for engineers working with Troubleshoot. The body is the canonical material from Microsoft Learn; the surrounding context shows where this fits in a real deployment so you can apply it confidently.
What this actually means in practice
I have spent the better part of three years helping tenant admins, on-prem Exchange custodians, and Microsoft 365 architects make sense of troubleshoot exchange onlinetoc verify the custom domain s mail exchanger mx record, and the honest truth is that the official wording rarely tells you what to do on a Monday morning. Short version. This sits at the intersection of Exchange Online - verify the custom domain's mail exchanger (MX) record and the public DNS MX-record verification that confirms inbound mail will reach Microsoft 365. My first real engagement around this exact topic was for a Chennai customer who had 28 days to roll the change out cleanly, and the lessons from that run still shape how I approach every Exchange Online - verify the custom domain's mail exchanger (MX) record review I touch today. The Microsoft Learn page is the canonical source, no question - but it leaves out the awkward bits like which switches the operator actually flips, how much the licensing footprint really costs, and which behaviours tend to surprise admins in production.
I will walk through this the way I would on a call with a junior tenant admin or a first-time Exchange engineer. First the why. Then the exact commands and clicks I run. Then the gotchas that cost me sleep. By the end you should be able to take this into your own tenant, point at a real workload, and not feel like you are reading a marketing brief in a second language.
Why I keep coming back to this topic
Honestly, the first few times I touched Exchange Online - verify the custom domain's mail exchanger (MX) record I underestimated this exact piece. I thought it was a one-screen toggle. It is not. It is the difference between a clean rollout and a 17-page incident review. For a mid-sized team paying around Rs 16,000 per month (roughly US$195) for the Microsoft 365 licences and add-ons that ride on top of this, missing the correct configuration can mean a five-figure remediation bill, two weeks of war-room calls, and a painful conversation with the steering committee.
Here is what I have seen go wrong when teams skim the official guidance. A Chennai-based team I worked with last quarter set the configuration up once, never reviewed it, and discovered six months later that the behaviour had drifted out of alignment with DNS MX records plus Microsoft 365 inbound mail routing. The fix took 41 hours of work across three people, plus an emergency engagement with Microsoft support that cost roughly Rs 12,500 in extra fees. I've seen this fail when the original owner left without writing down which switches they had touched - that is when 30 minutes of walking through the public DNS MX trace plus the Microsoft 365 domain health report the way I am about to would have saved the whole quarter.
My step-by-step walkthrough
I work the Microsoft admin portals and the command line side by side. Portal for the first pass when I am orienting in a new tenant. CLI when I am scripting the same change across five tenants because my fingers stop trusting GUIs after the third repetition. Here is the order I actually run.
- I confirm I am in the right tenant. Sounds obvious. I have applied changes to the wrong tenant once and had to spend three hours rolling them back.
Connect-MgGraph -Scopes "User.Read.All"first, every single time, and I read the device-code message before I click confirm. - I list the in-scope objects so I know the baseline.
Resolve-DnsName -Type MX -Name contoso.com -Server 1.1.1.1 | Format-Table NameExchange, Preference, TTLgives me the JSON I paste into my evidence folder. - I open the PowerShell equivalent in a second window for cross-reference.
Get-AcceptedDomain | Where-Object {$_.DomainName -eq 'contoso.com'} | Format-Listis the snippet I keep pinned because it surfaces the identity-side picture the admin portal sometimes hides. - I read the relevant section of the Microsoft Learn page end to end. Yes, the whole thing. Yes, including the small print near the bottom that nobody reads.
- I pull the matching configuration export from the public DNS MX trace plus the Microsoft 365 domain health report. I save it with the date stamp in the filename. Auditors and rollback plans both care about freshness.
- I write a one-paragraph note in our team Notion. Date, tenant ID, the exact command, and the behaviour I expect after the change. This is the muscle memory that pays off in incident reviews.
- I schedule a 90-day review on my calendar. The public dns mx-record verification that confirms inbound mail will reach microsoft 365 is not a set-and-forget topic. Microsoft updates its surface area regularly.
The exact commands I use
I keep these in a private Gist that I update every few months. Copy them, but read them first - some of these flags will not be safe in your tenant without adjustments.
# Connect with the right scopes
Connect-MgGraph -Scopes "User.Read.All","Directory.Read.All"
# Confirm the active tenant
Get-MgContext
# Connect Exchange Online for hybrid-aware work
Connect-ExchangeOnline -ShowBanner:$false
# Baseline list for the in-scope surface
Resolve-DnsName -Type MX -Name contoso.com -Server 1.1.1.1 | Format-Table NameExchange, Preference, TTL
# Identity-side cross-reference
Get-AcceptedDomain | Where-Object {$_.DomainName -eq 'contoso.com'} | Format-List
# Pull recent admin activity
Get-MgAuditLogDirectoryAudit -Top 25 | Format-Table ActivityDisplayName, ActivityDateTime
# Smoke test before declaring done
Get-MgUser -Top 5 | Format-Table DisplayName, UserPrincipalName, AccountEnabled
That last line is the one I forget to run. Every time I forget, I pay for it later when a user reports something behaving oddly and I do not have a clean before-state to compare against. Run the smoke test. Always.
A war story from Chennai
Here is a real one. A chennai non-profit it lead had two mx records pointing at different platforms during a partial migration and lost donor email for two days, and the timeline was tight. They had stood the workload up eight months earlier, never re-verified the alignment with DNS MX records plus Microsoft 365 inbound mail routing, and now had to produce a coherent rollout plan in less than two weeks. The fix itself was 90 minutes inside the relevant admin portal. The lead time was 6 hours of cross-team scheduling. The total impact was three engineers off their normal sprint for the better part of a working week, plus a Rs 9,400 Microsoft Premier ticket they had not budgeted for. All of it was avoidable. The controls were in place. The documentation was not.
I've seen this fail when teams treat Microsoft 365 or on-prem Exchange configuration as a checkbox. It is not. Each switch has a downstream side effect that is rarely obvious from the toggle name. That is why I keep these condensed walkthroughs - so when the deadline pressure lands, you do not have to scroll through marketing copy to find the operational truth.
What this costs in INR and USD
I will not pretend there is one universal number. There is not. But for a small in-scope tenant I help maintain, the monthly cost for Exchange Online - verify the custom domain's mail exchanger (MX) record plus the Microsoft 365 licensing that supports it lands at around Rs 16,000 (roughly US$195) at current exchange rates. Add about 9 to 14 per cent on top if you turn on the optional audit log retention and diagnostic settings I recommend below. For a startup in Chennai that is roughly the price of a single mid-tier laptop spread across a year. For an enterprise it is a rounding error. Either way, do not skip this to save Rs 1,500 per month. The next incident review will cost 40 times that.
Gotchas I have collected the hard way
- Region drift. Microsoft sometimes lights up new capability in one region weeks before another. I have been bitten twice. Check region availability against your DNS MX records plus Microsoft 365 inbound mail routing scope before you commit.
- Cached client state. The Microsoft 365 admin portal and the Exchange admin centre both cache aggressively. If a setting does not appear to change, open an incognito window and re-check before raising a ticket.
- Scope creep. Exchange Online - verify the custom domain's mail exchanger (MX) record is often described in concept docs that reference adjacent capabilities. Read the scope statement carefully and underline every product name. Anything not on that list is out of scope.
- Soft-delete windows. Microsoft 365 audit logs, mailboxes, Entra objects, and many Purview resources have 7 to 90 day retention defaults. Plan for it. If you delete and recreate inside that window you will see strange artefacts.
- Diagnostic log cost. Sending tenant audit logs to a Log Analytics workspace is cheap per row but adds up if you forget to set retention. I cap mine at 30 days unless audit requires more.
- Role-name confusion. the public DNS MX-record verification that confirms inbound mail will reach Microsoft 365 reuses common English words like 'Reader' across distinct role definitions. Always check the role definition ID, never just the display name.
How I verify the change actually worked
Verification is where most teams cut corners. I do not. Here is my checklist.
- Re-run the same query from a different machine. If the result differs, something is wrong with the local client state, not the tenant.
- Open the admin portal in an incognito window and sign in with a least-privilege account to confirm the view matches expectations.
- Check the Microsoft Entra audit log for the past 15 minutes. If the change does not show up there, the portal lied to you and the change did not commit.
- Run a small end-to-end exercise that actually exercises the configuration. For Exchange Online that means a real message trace. For Purview that means a real content search run. For Teams calling that means a test inbound call.
- Wait 5 minutes and re-check. Some Microsoft cloud surfaces take that long to propagate.
If it goes wrong, here is how I roll back
Always have a rollback plan. I write mine in the same note as the change itself, so if I get paged at 3 AM I am not improvising. For most Exchange Online - verify the custom domain's mail exchanger (MX) record changes the rollback is one of three patterns. Either I re-apply the previous configuration from saved JSON. Or I restore from a soft-deleted object. Or, if it is a permission change, I revert the role assignment with Remove-MgRoleManagementDirectoryRoleAssignment. None of these are dramatic. All of them need to be rehearsed before the incident, not during it.
How to apply this in your environment
- Treat this as a starting point. Your tenant is not my tenant. The SKU, region, and licence mix in your subscription will change what is sensible.
- Test in a non-production tenant first. Yes, even if you are confident. I have been surprised enough times to keep doing this.
- Pin your evidence. Capture the Exchange Online - verify the custom domain's mail exchanger (MX) record configuration version, the Microsoft cloud region, the date, and the business question it answers in your evidence folder.
- Cross-check Microsoft Learn one more time on the day you ship. Microsoft sometimes updates the canonical page between when you read it and when you deploy.
- Schedule a 90-day review. Put it in your team calendar. The public dns mx-record verification that confirms inbound mail will reach microsoft 365 changes. Your configuration should too.
Caveats and what to double-check
- Microsoft renames features. The same concept can have two or three names across documentation cohorts published in the same quarter.
- Some capabilities described in the docs may still be in preview. Confirm general availability before you rely on the contractual SLA.
- Regional availability varies. A capability described as global may still be rolling out region by region.
- Pricing for the workloads that anchor Exchange Online - verify the custom domain's mail exchanger (MX) record changes regularly. This page does not track pricing. Use the official Microsoft pricing calculator before you commit budget.
Related work in your environment
- Document this reference in your team wiki. Note which workloads depend on it today and which are planned.
- Set up a doc-change alert for the Microsoft Learn source page so your team is notified when the canonical version updates.
- Add a quarterly review to your governance cadence. Exchange Online - verify the custom domain's mail exchanger (MX) record is not a set-and-forget topic.
FAQ
References
- Microsoft Learn - official documentation for Exchange Online - verify the custom domain's mail exchanger (MX) record
- Microsoft 365 admin centre - tenant configuration surface
- Microsoft Graph PowerShell SDK - tenant automation reference
- Microsoft Tech Community - peer discussion and operational notes
Related fixes
Related guides worth a look while you sort this one out:
- Step 3: Add and verify the custom domain in Azure
- Solution 2: Update stale MX records
- Verify recipient's email address and resend your message in Outlook
- Verify that the appropriate accepted domains are in place
- Verify that the recipient exists and has an active license assigned
- Step 2: Verify DNS record configuration