Microsoft 365 Domain Verification: The TXT and MX Methods
Microsoft gives you a choice most other platforms don't — verify with a TXT record, or verify with an MX record instead. The reasoning behind offering both is worth understanding.
Two Roads to the Same Proof
When adding a custom domain to Microsoft 365 or Azure AD, the setup wizard typically presents a choice of verification methods, and the two most common are a TXT record and an MX record — an option most other major platforms don't bother offering. Both prove the same thing (DNS zone control), just through different record types, and Microsoft's decision to support both reflects a genuinely practical consideration: not every domain's DNS management situation makes adding a TXT record trivially easy, and MX records are something almost every domain owner already manages for mail regardless.
What the TXT Method Looks Like
example.com. 3600 IN TXT "MS=ms12345678"
The prefix MS=ms is fixed, followed by a numeric identifier unique to your specific tenant and domain verification attempt. It coexists with SPF, DKIM, and any other TXT records already on the domain without conflict, since TXT records have no coexistence restriction the way CNAME does.
What the MX Method Looks Like
The alternative method asks you to publish a specific MX record, with a particular hostname and priority value provided by Microsoft, purely for verification purposes rather than for actually routing mail. Microsoft's system checks for that exact MX entry to confirm ownership, the same underlying logic as TXT verification, just using a different record type that many domains already have infrastructure and processes around.
TXT vs MX Verification, Compared
| Factor | TXT Method | MX Method |
|---|---|---|
| Risk of conflicting with existing config | Very low — TXT records coexist freely | Higher — MX changes can affect actual mail routing if not planned |
| Best fit | Domains keeping mail elsewhere, or simply preferring the safer default | Domains already planning to route mail through Microsoft 365 |
| Ease of adding without side effects | Generally simple, low risk | Requires care to avoid disrupting existing mail flow |
Step-by-Step: TXT Verification
Start Domain Setup in the Admin Center
Add your custom domain and choose the TXT record verification method.
Copy the Provided Value
Copy the exact MS=ms string Microsoft provides, without modification.
Publish It as a TXT Record
Add it at your domain's apex through your DNS provider's dashboard.
Verify Before Clicking Verify
Confirm the record is live with an independent lookup first, then complete verification in the admin center.
Real-World Scenarios
Common Mistakes
| Mistake | Consequence |
|---|---|
| Choosing MX verification without planning mail routing | Can conflict with or disrupt existing mail flow if not coordinated carefully |
| Publishing the TXT value with extra characters | Causes an exact-match failure indistinguishable from a propagation delay |
| Removing the verification record after setup completes | Microsoft can periodically re-validate and revoke verified status if it disappears |
| Not documenting which method was used for which domain | Makes future troubleshooting or migration slower for teams managing many domains |
Best Practices
Default to TXT verification unless you're specifically planning to route mail through Microsoft 365 already, in which case MX verification can be a reasonable, dual-purpose choice. Always confirm the record is live with an independent tool before completing verification in the admin center, and keep the record documented and in place rather than assuming it's safe to remove once verification succeeds.
Related Tools
Confirm your Microsoft verification TXT record is live with TXT Lookup, or check MX configuration directly with MX Lookup. Review the complete record set with DNS Lookup, or check propagation with DNS Propagation Checker. Also managing Google services on this domain? See Google Verification, or read the broader Domain Verification guide.
FAQ
ToolsNovaHub tools are built and independently maintained with a focus on accurate, no-signup network and security utilities. Spotted an error? Let us know.
📋 Related Tools & Guides Comparison
| Resource | Type | Link |
|---|---|---|
| TXT Lookup | Tool | Open Tool → |
| MX Lookup | Tool | Open Tool → |
| Google Verification | Guide | Read Guide → |
| Domain Verification | Guide | Read Guide → |