Overview
If your domain’s DNS is managed on Cloudflare, you have three options for configuring DNS — from easiest to most manual.Option 1: Sign in to Cloudflare (One-Click)
The fastest option. Migma auto-detects that your domain uses Cloudflare DNS and handles everything for you — no API token needed.Add Your Domain
yourdomain.com or mail.yourdomain.com.Click Sign in to Cloudflare
Authorize in Cloudflare
Done
Option 2: API Token Setup
If you prefer to use an API token (or the one-click flow isn’t available for your setup), you can create a Cloudflare API token that lets Migma manage DNS records.Step 1: Add Your Domain to Migma
Open Sending Domains
Add Your Domain
yourdomain.com or mail.yourdomain.com.View DNS Records
Step 2: Create a Cloudflare API Token
You need to create an API token that allows Migma to add DNS records.Open Cloudflare API Tokens
Click Create Token
Select Custom Token
Name Your Token
Migma DNS Access.Add Zone Read Permission
- Zone → Zone → Read
Add DNS Edit Permission
- Zone → DNS → Edit
Set Zone Resources
Create the Token
Copy the Token
Step 3: Connect Cloudflare to Migma
Return to Migma
Click Connect Cloudflare
Paste Your API Token
Confirm Connection
Step 4: Auto-Configure DNS
Click Auto-Configure DNS
Review Records Added
- 3 DKIM CNAME records
- 1 SPF TXT record
- 1 DMARC TXT record
- 2 MAIL FROM records (MX + TXT)
Verify Domain
Option 3: Manual Setup
If you prefer to add DNS records manually in Cloudflare, follow these steps.Step 1: Log in to Cloudflare
Go to Cloudflare Dashboard
Select Your Domain
Open DNS Settings
Step 2: Add DKIM Records
Add 3 CNAME records for DKIM authentication.Click Add Record
Configure First DKIM Record
Add Second DKIM Record
Add Third DKIM Record
Step 3: Add SPF Record
Check for Existing SPF
v=spf1.Add or Modify SPF
If you already have an SPF record:Click Edit on your existing SPF record and add
include:spf.migma.ai before the ~all.Example:Step 4: Add DMARC Record
Add DMARC TXT Record
Step 5: Add MAIL FROM Records
Add both an MX record and a TXT record for the MAIL FROM subdomain. Copy the Name from Migma. If your sending domain is a subdomain and your Cloudflare zone is the parent domain, the Name may include that prefix, for examplesend.mail-eu.
Add MX Record
Add TXT Record for MAIL FROM
Step 6: Verify in Migma
Return to Migma
Click Verify Domain
Wait for Verification
Managing Cloudflare Connection
Disconnect Cloudflare
To remove the Cloudflare connection:- Go to Settings → Sending Domains
- Click on your domain
- Click Disconnect Cloudflare
- Your DNS records remain in Cloudflare (they’re not deleted)
Delete DNS Records When Removing Domain
When you delete a domain from Migma:- If Cloudflare is connected, you’ll see an option: Also delete DNS records from Cloudflare
- Check this option to remove all email-related DNS records
- Leave unchecked to keep the records (useful if migrating to another service)
Troubleshooting
Domain not found in your Cloudflare account
Domain not found in your Cloudflare account
- Your domain’s DNS is not managed on Cloudflare
- The API token doesn’t have access to this zone
-
Verify your domain is on Cloudflare:
- Log in to Cloudflare dashboard
- Check if your domain appears in the account
- Verify the domain status is “Active”
-
Check your API token permissions:
- Go to Cloudflare → Profile → API Tokens
- Click “View” on your token to see which zones it can access
- If using “Specific zone”, ensure your domain is included
-
Create a new token with correct permissions:
- Create a new token with “All zones” to test
- If that works, the original token was zone-restricted
Invalid API token
Invalid API token
- Token was copied incorrectly
- Token was revoked or expired
- Token doesn’t have required permissions
-
Create a new token with the correct permissions:
- Zone → Zone → Read
- Zone → DNS → Edit
- Copy the token immediately after creation (it’s only shown once)
- In Migma, click Disconnect Cloudflare and reconnect with the new token
DNS records not propagating
DNS records not propagating
- Cloudflare: Instant
- Global DNS: 5-60 minutes
- DKIM verification: Up to 72 hours (rare cases)
- Wait at least 15 minutes before retrying verification
- Use DNS Checker to see if your records have propagated
Proxy status warning
Proxy status warning
- Go to Cloudflare DNS settings
- Find the DKIM CNAME records
- Click the orange cloud to turn it gray
Record already exists
Record already exists