Guide · checked 15 Nov 2026

How to add a DMARC record in Cloudflare (and fix SPF)

If your domain’s DNS is on Cloudflare, you can publish the two records that help stop other people sending email in your name: a DMARC record and an SPF record. You can add them yourself in Cloudflare’s DNS editor in a few minutes, or after a free check we can add them for you in one click.

Before you start

  1. Check Cloudflare really holds your DNS. The domain’s name servers must point at Cloudflare. If they don’t, add the records at whoever does run your DNS: a record in a Cloudflare account that isn’t serving the domain changes nothing.
  2. Run the free check. It shows what is already published, so you edit rather than duplicate. No account needed.
  3. Pick a mailbox for DMARC reports. One you actually read, ideally on your own domain. It goes in the rua= part.

If a hosting company added your domain to Cloudflare for you, you may have to make DNS changes through that company instead.

Add a DMARC record by hand

  1. Log in to the Cloudflare dashboard and open your domain.
  2. Go to DNS, then Records.
  3. If a TXT record named _dmarc is already there, edit that one. Otherwise select Add record.
  4. Type: TXT. Name: _dmarc. Cloudflare adds your domain for you, so the saved record should show as _dmarc.yourdomain.co.uk.
  5. Content: a safe starting record, with your own report mailbox:
    v=DMARC1; p=none; rua=mailto:[email protected]
  6. Leave TTL on Auto and select Save.

p=none means mail servers still deliver your email as normal and send you reports. Nothing you send gets blocked by surprise. Once the reports show your real email passing, you can move to quarantine and then reject: see DMARC p=none: what next.

Keep exactly one DMARC record. Two records don’t add up to more protection: receivers treat them as no policy at all.

Cloudflare also has an Email section (DMARC Management) that can help set up these records. It works too; this guide uses the DNS Records page because that is where every record lives.

Add or merge an SPF record by hand

SPF is also a TXT record, but it sits at the root of the domain (@), not at _dmarc.

  1. On the same DNS → Records page, look for a TXT record named @ (or your bare domain) whose content starts v=spf1.
  2. If there is one, edit it and add any missing senders to it. Don’t add a second v=spf1 record.
  3. If there isn’t one, select Add record, type TXT, name @, and put one SPF record in the content. Its shape is v=spf1, then the parts your email provider gives you (for example an include:), then an ending such as ~all.
  4. Save, leaving TTL on Auto.

Don’t guess the value. It depends on who sends email for you: Microsoft 365, Google Workspace, your website’s contact form, a newsletter tool. Your provider’s setup page gives the exact part to include, and the free check shows what you already have.

Common mistakes

  • Two SPF records. Usually from adding a new v=spf1 record next to an old one. It’s a permanent error, and many receivers then treat SPF as failed. Merge them into one: how to merge SPF records.
  • Two DMARC records. Same problem at _dmarc: edit the one you have.
  • Jumping straight to -all. ~all is a soft fail; -all is a hard fail. Switching to -all before every sender is listed can block your own invoices or contact-form mail. Tighten once you’re sure the list is complete: ~all vs -all.
  • Too many lookups. SPF allows at most 10 DNS lookups (RFC 7208, section 4.6.4). Each include:, a and mx can count, and includes can nest. Over the limit, SPF fails. The free check counts them: SPF 10-lookup fix.
  • Expecting DKIM to switch on. These records don’t turn on DKIM. That is done in your email provider (Microsoft 365, Google Workspace and so on).

Or we can add them for you

If the free check shows a one-click fix is available, Fix it for me adds the SPF and DMARC records for you. You sign in to Cloudflare yourself, see the exact change, and confirm. We never see your password and we aren’t given ongoing access.

It is £49 plus VAT, one-off, and includes the Fix Pack for that domain (£25 plus VAT if you already have the Fix Pack).

We don’t offer one-click if a DMARC record already exists, because Cloudflare’s flow adds a record rather than replacing one. If your SPF record already ends in -all, we don’t merge it automatically, because that would loosen it to ~all: you get DMARC in one click and the SPF step by hand. In both cases the Fix Wizard shows the exact edit.

See how it works (30-second video)

After you save

Give DNS a few minutes, then run the free check again. If the new records don’t show yet, wait and retry: DNS caches can take a while to catch up.

Want to know if they ever change? Monitoring checks your domain every day and emails you in plain English if something weakens. £4 a month, cancel any time.

Questions

What do I type in the Name field for a DMARC record in Cloudflare?

_dmarc. Cloudflare adds your domain for you, so the record it shows should read _dmarc.yourdomain.co.uk.

Can I have two SPF records or two DMARC records?

No. Two SPF records at the same name are a permanent error. Two DMARC records are treated as no valid policy. Edit the existing record, or remove the extra one.

What is the difference between ~all and -all in SPF?

~all is a soft fail; -all is a fail. -all is stricter and can block mail from a sender you forgot to list. Check, then tighten.

What is the SPF 10-lookup limit?

Receivers count DNS lookups while they evaluate your SPF record, with a limit of 10 (RFC 7208, section 4.6.4). Going over makes the record a permanent error, so SPF doesn’t pass. The free check counts the lookups.

Can FaultyPacket add the records for me?

If your DNS is on Cloudflare and the free check says one-click is available, yes. Fix it for me adds the SPF and DMARC records after you confirm the change at Cloudflare. £49 plus VAT, one-off, Fix Pack included (or £25 plus VAT if you already have the Fix Pack). We never see your password.

Do you change DKIM, MX or my website?

No. DKIM is switched on at your email provider, and the Fix Pack has those steps. MX records and the website are left alone.

Steps checked against Cloudflare’s DNS and email-records documentation on 15 Nov 2026. Dashboards change: if a menu name differs, follow Cloudflare’s own help pages.