Email records · Cloudflare · Microsoft 365

How do I add an SPF record at Cloudflare for Microsoft 365?

Publish one SPF record at your domain in Cloudflare. If you already have one, add include:spf.protection.outlook.com inside it instead of adding a second.

Last read from the sources at the foot of this page.

Cloudflare · DNS record
Type
TXT
Name
@
Content
v=spf1 include:spf.protection.outlook.com -all
When Microsoft 365 is the only service that sends your mail.
01

What does an SPF record do?

It lists the services allowed to send mail as your domain. A mail server reads it to decide whether a message really came from one of them.

02

What record do I publish for Microsoft 365?

This is the record when Microsoft 365 is the only service that sends your mail. Microsoft recommends ending with -all for a Microsoft 365 domain, because it also recommends DKIM and DMARC.

SPF for Microsoft 365
v=spf1 include:spf.protection.outlook.com -all
03

How do I add it at Cloudflare?

  1. Sign in at cloudflare.com and select your domain.
    See the screenshot for step 1
    Cloudflare zone overview with the DNS Records link marked in the right panel.
    Open DNS Records

    Captured on 2 November 2026 from a sample account; the vendor may have changed its screens since.

  2. Open DNS Records and select Add record.
    See the screenshot for step 2
    Cloudflare DNS records list with the Add record button marked.
    Select Add record

    Captured on 2 November 2026 from a sample account; the vendor may have changed its screens since.

  3. Set Type to TXT.
    See the screenshot for step 3
    Cloudflare Add record form with the Type menu open and the list of record types marked.
    Open the Type menu and choose TXT

    Captured on 2 November 2026 from a sample account; the vendor may have changed its screens since.

  4. Set Name to @, which means the domain itself.
  5. Paste the record above into Content.Leave out quotation marks: Cloudflare adds them.
  6. Leave TTL on Auto and select Save.

In our words, from Cloudflare: adding a TXT record, read 2 November 2026. If a screen has changed since, follow the host's own page.

04

What if I already have an SPF record?

Keep one record. Add include:spf.protection.outlook.com to the record you have, before its last word, and keep every service already in it. More than one SPF record makes the check fail for every message.

An SPF record may make at most 10 DNS lookups. Each include counts, and so do the includes inside it. Past 10, the check fails, so remove services you no longer use before adding new ones.

Sources

Where does this come from?

Related

See what is open before anyone else does.

We read your domain externally and show each way in with a check anyone can re-run.