Skip to content

Cloudflare DNS

Add Compact's records on Cloudflare by hand or with an API token, and why mail records must be DNS only.

Updated 2026-12-03

If your domain uses Cloudflare’s nameservers, you have two options.

Option 1: let Compact add the records

  1. In Admin › Domains, paste a Cloudflare API token limited to editing DNS for that zone.
  2. Compact checks the token, shows exactly what it will add, and writes the records.

The token is used once and not stored. Your existing SPF entries are merged into one record, an existing DMARC policy is kept, and mail records are written as DNS only. The MX record is changed only if you also tick Also switch the MX record now, so you can leave the cut-over for later (see Switch your MX).

Option 2: add them by hand

  1. In the Cloudflare dashboard, open the domain, then DNS, then Records.
  2. Add each record with its type, Name and Content.

Important: DNS only

Set Proxy status to DNS only (grey cloud) on every mail record. Mail host names behind the orange cloud break mail apps and MTA-STS. Compact warns you when it sees a proxied mail record.