Fastmail + Cloudflare
Set up Fastmail email on Cloudflare
The records Fastmail needs, written with the field names Cloudflare uses (Name, Mail server, Content, Target), in the order to add them.
- 4 steps
- 7 DNS records
- Sources checked October 21, 2026
Before you start
- Have your Fastmail account ready. Some values are unique to your account and come from the Fastmail Settings.
- Open DNS at Cloudflare: Sign in to the Cloudflare dashboard and select your domain. Open the DNS Records page.
- Keep both tabs open and add the records below one at a time.
Records to add
Copy each value with the button next to it. Rows marked “Copy from Fastmail Settings” are unique to your account.
| Record | Type | Name | Value | Priority | TTL | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| MX records Where incoming email goes | Type | MX | Name | @ | Value | in1-smtp.messagingengine.com | Priority | 10 | TTL | Auto |
| MX records Where incoming email goes | Type | MX | Name | @ | Value | in2-smtp.messagingengine.com | Priority | 20 | TTL | Auto |
| SPF record Which servers may send as you | Type | TXT | Name | @ | Value | v=spf1 include:spf.messagingengine.com ?all | Priority | n/a | TTL | Auto |
| DKIM A signature on every message | Type | CNAME | Name | fm1._domainkey | Value | fm1.yourdomain.com.dkim.fmhosted.com | Priority | n/a | TTL | Auto |
| DKIM A signature on every message | Type | CNAME | Name | fm2._domainkey | Value | fm2.yourdomain.com.dkim.fmhosted.com | Priority | n/a | TTL | Auto |
| DKIM A signature on every message | Type | CNAME | Name | fm3._domainkey | Value | fm3.yourdomain.com.dkim.fmhosted.com | Priority | n/a | TTL | Auto |
| DMARC record What to do with fakes · recommended | Type | TXT | Name | _dmarc | Value | v=DMARC1; p=none; | Priority | n/a | TTL | Auto |
Step by step in Cloudflare
Point your MX records
MX records tell every other mail server where to deliver email for your domain. They must point to your provider and nowhere else.
- Type
- MX
- Name
-
@ - Priority
- 10
- Mail server
-
in1-smtp.messagingengine.com
- Type
- MX
- Name
-
@ - Priority
- 20
- Mail server
-
in2-smtp.messagingengine.com
In Cloudflare
- On the DNS Records page, select Add record.
- Choose MX as the Type.
- Fill in Name, Mail server and Priority.
- Select Save.
- Delete any other MX records: select Edit on each one, then Delete, and confirm.
- Repeat for each MX record above.
Add the SPF record
SPF is a TXT record that lists the services allowed to send email from your domain, so receivers can spot forgeries.
- Type
- TXT
- Name
-
@ - Content
-
v=spf1 include:spf.messagingengine.com ?all
- This is the exact value from Fastmail's manual DNS guide, which ends in ?all (neutral).
In Cloudflare
- On the DNS Records page, select Add record.
- Choose TXT as the Type.
- Fill in Name and Content.
- Select Save.
Set up DKIM
DKIM publishes a public key so receivers can confirm your messages really came from you and were not changed on the way.
- Type
- CNAME
- Name
-
fm1._domainkey - Target
-
fm1.yourdomain.com.dkim.fmhosted.com
- Type
- CNAME
- Name
-
fm2._domainkey - Target
-
fm2.yourdomain.com.dkim.fmhosted.com
- Type
- CNAME
- Name
-
fm3._domainkey - Target
-
fm3.yourdomain.com.dkim.fmhosted.com
In Cloudflare
- On the DNS Records page, select Add record.
- Choose CNAME as the Type.
- Fill in Name and Target.
- Set Proxy status to DNS only (grey cloud).
- Select Save.
- Repeat for each CNAME record above.
Add the DMARC record (recommended)
DMARC tells receivers what to do with mail that fails SPF and DKIM, and where to send reports about it.
- Type
- TXT
- Name
-
_dmarc - Content
-
v=DMARC1; p=none;
In Cloudflare
- On the DNS Records page, select Add record.
- Choose TXT as the Type.
- Fill in Name and Content.
- Select Save.
Check your setup
Once the records are saved, run a live check. We look up your domain in public DNS and tell you what is right, missing or wrong, with the fix in Cloudflare’s words.
Common mistakes with Fastmail on Cloudflare
Adding fewer than three DKIM records
Fastmail signs with three selectors (fm1, fm2, fm3). All three CNAMEs are required.
Adding a second SPF record
Only one record may start with v=spf1. Merge Fastmail's include into the existing one.
Cloudflare: Keep email CNAMEs on DNS only
Set Proxy status to DNS only (grey cloud) for DKIM and verification CNAME records. Cloudflare says records used for email or domain verification should not be proxied, and may block proxying DKIM CNAMEs.
Cloudflare: Turn off Cloudflare Email Routing first
If Email Routing is on, Cloudflare has added locked MX records (route1, route2 and route3.mx.cloudflare.net) and an SPF record with include:_spf.mx.cloudflare.net. Unlock them or disable Email Routing (Compute > Email Service > Email Routing > your domain > Settings) before switching to another provider. Email Routing can't be used with an outside mail server.
Rather have someone do it for you?
Tell us your domain and we will add and verify every record for Fastmail on Cloudflare, then send you the check results.
Fastmail on Cloudflare: questions
Where do I add Fastmail DNS records in Cloudflare?
Sign in to the Cloudflare dashboard and select your domain. Open the DNS Records page. Add each record there, one at a time.
What goes in the Name field at Cloudflare?
Enter @ for records on your bare domain, such as MX and SPF. For the others, enter only the part before your domain, for example fm1._domainkey. Cloudflare adds your domain automatically.
Do I need to delete my existing MX records at Cloudflare?
Yes. Mail servers deliver to every MX record you publish, so keep only the Fastmail MX records and delete the rest. If Email Routing is on, Cloudflare has added locked MX records (route1, route2 and route3.mx.cloudflare.net) and an SPF record with include:_spf.mx.cloudflare.net. Unlock them or disable Email Routing (Compute > Email Service > Email Routing > your domain > Settings) before switching to another provider. Email Routing can't be used with an outside mail server.
Where do I get my Fastmail DKIM record?
Fastmail DKIM records are CNAME records whose value includes your domain, for example fm1.yourdomain.com.dkim.fmhosted.com. Copy the exact values for your domain from the table on this page.
Sources
Every value and step on this page comes from these official pages. Dashboards change, so if something doesn’t match what you see, tell us.
- Cloudflare DNS: TXT, CNAME, MX Records (Zoho Mail Help) Checked October 21, 2026
- Connect your DNS records at Cloudflare to Microsoft 365 (Microsoft Learn) Checked October 21, 2026
- Create zone apex record (Cloudflare Docs) Checked October 21, 2026
- Email Routing: domain configuration (Cloudflare Docs) Checked October 21, 2026
- Manage DNS records (Cloudflare Docs) Checked October 21, 2026
- Manual DNS configuration (Fastmail Help) Checked October 21, 2026
- Proxy status (Cloudflare Docs) Checked October 21, 2026
- RFC 7208: Sender Policy Framework (IETF) Checked October 21, 2026
Fastmail on other hosts
- Fastmail on Amazon Route 53
- Fastmail on Bluehost
- Fastmail on DreamHost
- Fastmail on GoDaddy
- Fastmail on Hostinger
- Fastmail on IONOS
- Fastmail on Name.com
- Fastmail on Namecheap
- Fastmail on Network Solutions
- Fastmail on OVHcloud
- Fastmail on Porkbun
- Fastmail on SiteGround
- Fastmail on Squarespace Domains
- Fastmail on Wix
- Fastmail on WordPress.com