Connecting Your Domain to Microsoft 365 (O365) via DNS

Connecting Your Domain to Microsoft 365 (O365) via DNS



Step 1: Add Your Domain in Microsoft 365

  • Log in to your Microsoft 365 Admin Center.
  • Go to Settings → Domains.
  • Click Add Domain.![](https://storage.crisp.chat/users/helpdesk/website/-/5/2/4/2/52421894134f0400/microsoft_4gnrn4.png)


  • Enter your domain name.
  • Microsoft will provide a TXT verification record.
  • Add this verification record in your DNS panel (instructions below), then return to Microsoft 365 and click Verify.



Step 2: Access the DNS Management Interface

  • Log in to your EX2’s Client Area.
  • Go to My Domains and select the domain you want to manage.
  • Click the three dots (⋮) next to the domain and choose Manage Domain.![](https://storage.crisp.chat/users/helpdesk/website/-/5/2/4/2/52421894134f0400/screenshot-from-2025-11-17-20-_1fxaga5.png)


  • On the Domain Overview page, click DNS Management to access the DNS Zone Editor.



Step 2: Add the MX Record for Microsoft 365 (Outlook)

Microsoft 365 uses a single MX record format based on a domain-specific key provided in the Microsoft 365 Admin Center.

Microsoft 365 MX Record Format

Priority

Server Address

0

<domain-key>.mail.protection.outlook.com

Important:

  • Replace <domain-key> with the exact value provided in your Microsoft 365 Admin Portal under Domains.
  • This value is unique for each domain.

Instructions:

  • In your DNS settings, create a new MX record:
  • Record Type: MXHost: @ (or your domain name)Priority: 0Value: <domain-key>.mail.protection.outlook.com
  • Save the record.
  • DNS propagation may take up to 24 hours.



Step 3: Add Additional Required Microsoft 365 DNS Records

To ensure full email functionality (autodiscover, spam protection, verification), Microsoft 365 requires TXT and CNAME records.

1. TXT Record – Domain Verification

Microsoft provides a TXT verification code. Add it as:

Host

Type

Value

@ or domain name

TXT

MS=<verification-code>

Replace <verification-code> with the value given in your Microsoft 365 setup.![](https://storage.crisp.chat/users/helpdesk/website/-/5/2/4/2/52421894134f0400/screenshot-from-2025-11-18-01-_y5e928.png)




2. TXT Record – SPF Record (Required to Prevent Spoofing)

Host

Type

Value

@ or domain name

TXT

v=spf1 include:spf.protection.outlook.com -all



3. CNAME Record :

Host

Type

Value

autodiscover

CNAME

autodiscover.outlook.com



Step 4: Save and Verify Changes

  1. After entering all records, click Save.
  2. Go to Microsoft 365 Admin Center → SetupDomains.
  3. Select your domain and click Verify.
  4. Microsoft will automatically check the DNS configuration.



Step 5: Test Email Delivery

Once DNS propagation is complete:

  1. Send a test email to your Microsoft 365 mailbox.
  2. Send an email from your Microsoft 365 mailbox.
  3. Use external tools such as:
    • MXToolbox
    • DNSChecker

These tools confirm whether your DNS records are correct and fully propagated.



Once verified, you can be confident that your email is fully functional, secure, and integrated with Microsoft's cloud services.


Updated on: 17/11/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!