Skip to main content
Help & Support/Add MailAfiniti DNS Records in Cloudflare
Domain Setup

Add MailAfiniti DNS Records in Cloudflare

M

MailAfiniti Support

November 17, 2026-4 min read

Add MailAfiniti's MX, SPF, DKIM and DMARC records in Cloudflare with one click, or by hand in about 5 minutes. Illustrated step-by-step instructions.

Your domain needs four DNS records in Cloudflare (MX, SPF, DKIM and DMARC) before its email runs through MailAfiniti. MailAfiniti supports one-click setup for Cloudflare, so you usually don't have to type anything.

Before you start: make sure your domain's DNS is on Cloudflare (not sure?), and turn off Email → Email Routing in Cloudflare if it's on. It adds its own MX records that block yours.


Easiest: one-click setup (about 1 minute)

1. In the MailAfiniti customer portal, go to Domains and click Connect on your domain.

MailAfiniti customer portal Manage Domains page with the Connect button highlighted

2. Click Set up at Cloudflare. Cloudflare opens, shows you exactly which records will be added, and you click to approve. No API keys, nothing to copy.

MailAfiniti customer portal Connect window offering to add the records automatically, with the Set up at Cloudflare button highlighted

3. Back in the portal, click Check records (Step 8). That's it.


Manual setup (about 5 minutes)

Prefer to add the records yourself? In the portal's Connect window, choose Add the 4 records myself and keep it open. You'll copy each value from there.

Step 1: Open your domain

Sign in at dash.cloudflare.com and click your domain.

Cloudflare Domains list with the domain name highlighted

Step 2: Go to DNS → Records

In the left sidebar, expand DNS and click Records.

Cloudflare sidebar with DNS expanded and Records highlighted

Step 3: Click Add record

Delete any MX records left over from your old email provider, then click Add record.

Cloudflare DNS records page with the Add record button highlighted

Step 4: Add the MX record

Set Type to MX, Name to @, Mail server to mx.mailafiniti.io (as shown in the portal) and Priority to 10. Click Save.

Cloudflare Add record form: Type MX, Name @, Mail server mx.mailafiniti.io, Priority 10

Step 5: Add the SPF record

Click Add record again. Set Type to TXT and Name to @, then paste your SPF value from the portal into Content (it starts with v=spf1). Click Save.

Cloudflare Add record form: Type TXT, Name @, Content v=spf1 include:spf.mailafiniti.io ~all

Already have a record starting with v=spf1? Edit that one and add include:spf.mailafiniti.io instead. Two SPF records break both.

Step 6: Add the DKIM record

Click Add record again. Set Type to TXT and Name to dkim._domainkey, then paste your DKIM key from the portal into Content (it starts with v=DKIM1). Click Save.

Cloudflare Add record form: Type TXT, Name dkim._domainkey, Content with a DKIM key starting v=DKIM1

Your DKIM key is unique to your domain. Copy yours from the portal, not the one in this screenshot.

Step 7: Add the DMARC record

Click Add record again. Set Type to TXT and Name to _dmarc, then paste your DMARC value from the portal into Content (it starts with v=DMARC1). Click Save.

Cloudflare Add record form: Type TXT, Name _dmarc, Content starting v=DMARC1

Step 8: Verify in the MailAfiniti customer portal

In the portal, click Connect on your domain, then Check records. Cloudflare usually publishes changes within a few minutes.

MailAfiniti customer portal Connect window with the Check records button highlighted

When all four records are found, your domain shows Connected.

MailAfiniti customer portal domain list showing the domain as Connected with required DNS records verified

Not verifying? See Records not verifying, check your live records with the Email Health Check, or email support@mailafiniti.io with your domain name.