Skip to content
nofeb

SPF, DKIM, DMARC and MX on Cloudflare

DNS host detected from nameservers under *.cloudflare.com, *.foundationdns.*

On Cloudflare, nofeb can create the email records itself: give it a token for one call (api_token). API token with Zone:Read and DNS:Edit on the zone. To type them instead, Cloudflare wants labels such as bounce.

Checked against the engine on .

How does nofeb know the domain is on Cloudflare?

It looks up the zone's NS records and matches the nameserver hostnames. Nameservers under *.cloudflare.com or foundationdns.* mean Cloudflare. When a zone is split between two hosts during a move, the host serving most of its nameservers wins.

Can nofeb publish the records on Cloudflare for me?

Yes. Send the Cloudflare credentials, api_token, with provider cloudflare. API token with Zone:Read and DNS:Edit on the zone.

Publish on Cloudflare
POST https://api.nofeb.com/v1/domains/{domain_id}/dns/apply
{
  "credentials": {
    "provider": "cloudflare",
    "api_token": "…"
  }
}

What is specific to Cloudflare?

  • When nofeb writes through the Cloudflare API, every DKIM CNAME is created with proxied set to false, so the grey-cloud mistake cannot happen.
  • The live check recognises a proxied CNAME by what it resolves to and reports it by name, rather than as a missing record.

What exactly do I type in Cloudflare's record form?

Shown for example.com as Cloudflare wants it; placeholder values come from your dns-setup response.

RecordTypeName boxValue boxPriority
DKIM key 1 CNAME token1._domainkey target-1-from-nofeb —
DKIM key 2 CNAME token2._domainkey target-2-from-nofeb —
DKIM key 3 CNAME token3._domainkey target-3-from-nofeb —
MAIL FROM MX MX bounce feedback-host-from-nofeb 10
MAIL FROM SPF TXT bounce v=spf1 include:<value from nofeb> ~all —
DMARC TXT _dmarc v=DMARC1; p=none; rua=mailto:dmarc@example.com —
Inbound MX (optional) MX @ inbound-host-from-nofeb 10

Which form rules does Cloudflare follow?

  • Cloudflare appends .example.com to whatever you type in the name box, so type only the label, for example bounce. Typing the full name creates bounce.example.com.example.com.
  • For the domain itself (the apex), type @.
  • Paste TXT values without quotes; Cloudflare adds them. Quotes you type become part of the value and break SPF and DMARC.
  • MX priority has its own field: use 10.
  • Cloudflare accepts the name relative (bounce) or fully qualified (bounce.example.com); both create the same record.
  • Set each DKIM CNAME to DNS only (grey cloud). A proxied CNAME is flattened to an IP address and DKIM verification fails.

Can I manage the records on Cloudflare with Terraform?

Yes. The dns-setup response includes Terraform using the cloudflare_dns_record resource for every record. The DMARC record looks like this:

Terraform for Cloudflare
variable "cloudflare_zone_id" {
  type        = string
  description = "Zone ID of example.com"
}

resource "cloudflare_dns_record" "dmarc" {
  zone_id = var.cloudflare_zone_id
  name    = "_dmarc.example.com"
  type    = "TXT"
  content = "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
  ttl     = 3600
}

# DKIM CNAMEs are emitted with: proxied = false
Publishing email DNS records on Cloudflare Add a domain; nofeb detects the DNS host from its NS records. Then one of three paths: a one-click Domain Connect link (Beta), publishing through the host's API with a token used once (Cloudflare, DigitalOcean, Hetzner DNS, Vercel, Porkbun, Gandi), or instructions written for that host plus zone-file, Route 53 and Terraform exports. Every record is then checked live, showing what was found and the likely mistake, and domain.verified is emitted when all pass. Add the domain POST /v1/domains records generated Detect the DNS host from its nameservers GET …/dns-setup One-click Domain Connect sign in at the host, click Connect Beta Published through the API token used for one call, never stored POST …/dns/apply Instructions for that host host and value boxes, as its form wants zone file · Route 53 · Terraform Live check found value and likely fix domain.verified
nofeb looks up who runs Cloudflare from its nameservers, takes the shortest path that host allows, then checks every record live until domain.verified fires.

Frequently asked questions

Do I type the full domain in Cloudflare's name field?

No. Cloudflare appends .example.com itself, so for the MAIL FROM records type bounce. Typing the full name creates bounce.example.com.example.com, and nofeb's live check reports exactly that.

Does Cloudflare need quotes around TXT values like DMARC?

No. Paste v=DMARC1; p=none; rua=mailto:dmarc@example.com as it is; Cloudflare adds the quotes, and quotes you type become part of the value.

Where are the DNS records in Cloudflare?

In Cloudflare's DNS page: dash.cloudflare.com/?to=/:account/example.com/dns, with your domain in place of example.com. The dns-setup response links the same page for your domain.

Can nofeb add the records on Cloudflare automatically?

Yes. Send a Cloudflare token with POST /v1/domains/{domain_id}/dns/apply. API token with Zone:Read and DNS:Edit on the zone. nofeb never deletes records; a conflict it will not resolve, such as another SPF record at the same name, comes back as skipped with what to do.

Status of everything on this page

Every capability named above, with its status as reconciled against the engine.

CapabilityWhat it doesStatus
Custom domains Add a domain and nofeb returns its DKIM, custom MAIL FROM and DMARC records, plus an inbound MX if you want nofeb to receive its mail, checks them, and emits domain.verified when they pass. Shipped
DNS setup made easy nofeb detects who hosts your domain's DNS and gives you the shortest path for that host. It can publish the records through the Cloudflare, DigitalOcean, Hetzner DNS, Vercel, Porkbun or Gandi API with a token used for that one call and never stored, and it never deletes a record. Every other host gets step-by-step instructions in its own terms, plus zone-file, Route 53 and Terraform exports. A live check shows each record's status, what was found and the likely mistake. Pointing your MX at nofeb is a separate choice, so publishing sending records never moves your mail. Shipped
Inbound mail server that checks mail at the door nofeb's own MX receives mail for the shared domain and your custom domains, with STARTTLS. It checks every recipient before accepting any data, verifies SPF, DKIM, ARC and DMARC, and scans for spam and viruses before it answers. Mail that fails a DMARC reject policy, carries a virus or is clearly spam is refused during delivery instead of bounced later; likely spam and DMARC-quarantined mail is filed into Junk. Every message carries a security verdict with its authentication, spam, virus and TLS results. Shipped