Lesson 4 of 82 min

Publish SPF, DKIM and DMARC on every sending domain

Add the three DNS records that let a receiver check your mail, in order, and confirm that they pass.

Records for arden-cloud.example

Record
Where it lives
Example value
SPF
TXT at the root of the domain
v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all
DKIM
Key at a selector under _domainkey
Shown in your provider's admin console
DMARC
TXT at _dmarc.arden-cloud.example
v=DMARC1; p=none; rua=mailto:dmarc@arden-cloud.example
Fig. 1 — Illustration of the three records for one sending domain, with example values.

Continue for free

Enter your email to open this lesson. You stay signed in for 7 days on this device.

What to set

  1. Publish one SPF TXT record at the root of the domain naming your mail provider, such as include:_spf.google.com for Google Workspace. Merge every sender into that one record.
  2. Generate the DKIM key in your provider's admin console, publish what it shows and switch signing on. Microsoft 365 uses two CNAME records.
  3. Add a DMARC TXT record at _dmarc on the domain, starting with p=none and a rua address for reports.
  4. Wait for DNS to spread, send a test to a Gmail mailbox and look in the headers for spf=pass, dkim=pass and dmarc=pass.
  5. Once reports show that your legitimate mail passes, consider p=quarantine and later p=reject.

Why it matters

Receivers check these records on the domain in the From address. SPF lists the servers allowed to send, DKIM adds a signature the receiver can verify, and DMARC says what to do when both fail. Passing removes one reason for a filter to distrust you, and it does not decide where a message lands.

Watch out for

  • Two SPF records on one domain cause an SPF error. Merge them into one.
  • SPF allows 10 DNS lookups in total, and a long chain of include entries can push you over the limit.
  • Setting p=reject before you have read the reports can block your own mail.

Good practice

  • Do every step separately for each sending domain.
  • Send from an address on the same domain that passes SPF or DKIM, because DMARC checks alignment.
  • Check again after any DNS edit, since a passing result describes only the day it was run.
Worked example

Jane's mailboxes on arden-cloud.example sit on Google Workspace and Microsoft 365, so she merges both providers into one SPF record. Her test to a Gmail address shows spf=pass, dkim=pass and dmarc=pass.

Go deeper: What are SPF, DKIM and DMARC, and how do you set them up for cold email?

Continue for free

Enter your email to open the course. You stay signed in for 7 days, so every course opens straight away.

We use your email to give you access, to see which courses you open and, if you tick the box, to send the newsletter. See the privacy policy.