Bridge CDN
On this page

Which Microsoft 365 DNS records do you need?

Type Name Value Priority
TXT @ MS=ms12345678 (from the admin center) —
MX @ example-com.mail.protection.outlook.com 0
CNAME autodiscover autodiscover.outlook.com —
TXT @ v=spf1 include:spf.protection.outlook.com -all —
CNAME selector1._domainkey value shown in Microsoft Defender —
CNAME selector2._domainkey value shown in Microsoft Defender —
TXT _dmarc v=DMARC1; p=none; rua=mailto:dmarc@example.com —

The MX target is specific to your domain. Use the exact value shown in the Microsoft 365 admin center.

Some tenants also see records for Teams and device management: CNAMEs such as lyncdiscover, sip, enterpriseregistration and enterpriseenrollment, plus SRV records like _sip._tls and _sipfederationtls._tcp. Add those only if your admin center lists them.

Before you start

  • Global admin access to the Microsoft 365 admin center, under Settings › Domains.
  • A look at the current zone. Run dig example.com MX +short and dig example.com TXT +short. Note old MX records and any existing SPF policy.
  • A plan for existing mail. Once the MX record changes, new mail lands in Microsoft 365. Messages already delivered to the old system stay there.

Keep every mail record DNS-only. The Bridge proxy is for website A and AAAA records. MX hosts, autodiscover and DKIM targets must resolve exactly as Microsoft publishes them.

Office 365 DNS settings in Bridge, step by step

  1. Add the domain in Microsoft 365. In the admin center, choose to add the DNS records yourself rather than letting Microsoft manage DNS. It then shows the verification TXT value.
  2. Verify ownership. In Bridge, add a TXT record named @ with the MS=ms… value. Save, then click verify in Microsoft 365.
  3. Switch mail. Remove the previous provider's MX records and add the office 365 MX record with priority 0. Auto TTL for MX is 120 seconds in Bridge DNS, so a mistake is quick to undo.
  4. Add autodiscover. Create a CNAME named autodiscover pointing to autodiscover.outlook.com. Outlook uses it to find mailbox settings. A CNAME can't share its name with other records, as the CNAME reference explains.
  5. Publish SPF. Merge include:spf.protection.outlook.com into your single v=spf1 record. Never add a second SPF record. See how to add and verify an SPF record.
  6. Enable DKIM. In the Microsoft Defender portal, open the DKIM settings for the domain. Copy the two CNAME targets for selector1._domainkey and selector2._domainkey, add both in Bridge, then turn signing on in Defender.
  7. Add DMARC at _dmarc with p=none first, as described in adding a DMARC record and choosing a policy.

How to check Microsoft 365 DNS settings

Query a Bridge nameserver directly:

dig @ns1.bb-ns.com example.com MX +short
dig @ns1.bb-ns.com autodiscover.example.com CNAME +short
dig @ns1.bb-ns.com selector1._domainkey.example.com CNAME +short
dig @ns1.bb-ns.com example.com TXT +short

You should see one MX line with priority 0, the autodiscover target, both DKIM CNAMEs and a single v=spf1 string. In the admin center, the domain's health check reports any record it can't find. Finally, send a message to an outside mailbox and look for spf=pass, dkim=pass and dmarc=pass in the Authentication-Results header.

Common problems with office 365 DNS

Symptom Likely cause Fix
Admin center says the MX record is missing Typo, or old MX records still present Use the exact host from the admin center and delete old MX records
Outlook keeps asking for server settings autodiscover CNAME missing or pointing elsewhere Add the CNAME to autodiscover.outlook.com
DKIM won't enable in Defender The CNAMEs aren't resolving yet, or a TXT record sits on the same name Check both selectors with dig and remove conflicting records
spf=permerror Two SPF records Merge into one
Mail bounces to a host name MX entered as an IP address MX must name a host. See the MX record reference.

Rolling back

To undo the office 365 DNS settings for mail, restore the old system's MX records and remove the Microsoft one. Senders pick up the change within minutes thanks to the short TTL. Leave the DKIM CNAMEs in place while any mail is still sent through Microsoft 365. Removing them would make those messages fail DKIM.

Microsoft 365 DNS questions

What is the MX record for Office 365?

Office 365 DNS settings use one MX record with priority 0, pointing to your domain with dashes instead of dots plus mail.protection.outlook.com, for example example-com.mail.protection.outlook.com. Newer domains may get a different host. Copy whatever the admin center shows.

Do I need the autodiscover CNAME?

Yes, for Outlook clients. Without it, Outlook can't find mailbox settings automatically and asks users to configure servers by hand.

Can Microsoft manage DNS for my domain instead?

Microsoft can host DNS itself, but then Bridge stops being authoritative for the zone. To keep Bridge DNS, choose the option to add records yourself.

How does Microsoft 365 DKIM work with DNS?

Microsoft signs mail with keys it hosts. You publish two CNAMEs, selector1 and selector2, that point to those keys, so Microsoft can rotate keys without you editing DNS again.

Do I need the Teams SRV records?

Only if the admin center lists them for your tenant. Many organisations using only mail never need them.

For how MX, SPF, DKIM and DMARC fit together, see the email DNS overview. Selector formatting is covered in adding and verifying a DKIM record.