Course · Lesson 5 of 7
SPF, DKIM and DMARC
You have seen what SPF, DKIM and DMARC check along the way. Now learn which DNS records support them and how to configure them.
After this lesson, you can
- explain what SPF, DKIM and DMARC each check
- read an SPF record and add a new sender
- introduce DMARC cautiously with p=none
The visible sender address is easy to fake. SPF, DKIM and DMARC help the recipient detect that. Their settings live in DNS. DKIM is sometimes configured with a CNAME pointing to the provider's key. Correct settings help, but do not guarantee a place in the inbox.
SPF: who may send email?
SPF checks whether the sending server may send on behalf of the technical sender domain. This is the domain used for delivery errors, also called MAIL FROM. It does not have to match the sender address you see in your mail app.
@ TXT "v=spf1 include:spf.postman.example ~all"
v=spf1comes first and identifies this TXT record as an SPF record.include:means: use this email provider's authorised senders.~allat the end marks other sending servers as suspicious.-allis stricter: other servers receive a fail result. The recipient decides whether to reject the email.- There may be only one SPF record per name. Two SPF records cause an error. Other TXT records can coexist with SPF.
What does a mean in SPF?
Sometimes an SPF record also contains a. This authorises the servers at the domain's IP addresses to send email. The recipient looks up those addresses using A records for IPv4 or AAAA records for IPv6.
@ TXT "v=spf1 a include:spf.postman.example ~all"
Does the domain's A record point to 203.0.113.10? The a mechanism then lets that server send for the domain. In this example, the email provider is also authorised through include:.
Take care when moving a website: if you change that A record to 203.0.113.20, a will authorise the new IP address instead. The old address is no longer authorised through a. Add a only if the servers behind those DNS records really need to send email.
DKIM: is the signature valid?
The email provider can add a digital signature to your email. The recipient uses it to verify the signed parts of the message. The public key lives in DNS, for example at s1._domainkey. Copy the TXT or CNAME record supplied by your provider and check that DKIM is enabled at the provider too.
DMARC: what if the checks do not match?
DMARC connects SPF and DKIM to the visible sender address. At least one must pass and match that sender domain. This is called alignment. By default, subdomains of the same organisational domain can align too. If neither check qualifies, your DMARC policy tells the recipient how you want it to handle the message.
_dmarc TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
v=DMARC1;comes first and identifies this TXT record as a DMARC record. The semicolon separates this setting from the next.p=none: request no extra action for a failed DMARC check. Start here to observe what happens. Spam filters still operate.p=quarantine: ask the recipient to set the email aside, usually in spam.p=reject: ask the recipient to reject the email.rua=: the address for aggregate reports. Create this address first or use a reporting service such as Cloudflare DMARC Management. Not every recipient sends reports.
Viewing DMARC reports in Cloudflare
If Cloudflare manages your domain's DNS, you can use DMARC Management. Cloudflare receives reports and turns them into a readable overview. You can see which servers send for your domain and whether SPF, DKIM and DMARC pass.
Select your domain in Cloudflare and go to Email → DMARC Management. Enable the feature and follow the steps. Cloudflare adds its reporting address to rua in your existing DMARC record or helps you create one. You do not need to create a mailbox for Cloudflare's reporting address.
The first reports can take about a day to arrive. Check that your own email provider and any newsletter service pass the checks before tightening the policy.
Guide: enable DMARC Management · Understanding the report overview.
Adding a new sending service? Follow that service's instructions. It may use a separate subdomain. Do not keep adding include: without checking the limit: SPF allows at most ten terms that require DNS lookups, including those inside nested includes.
What to remember
- SPF checks the sending server. DKIM checks the signature. DMARC checks that a successful check aligns with the visible sender.
- Use one SPF record per name. Add senders only as instructed by your provider.
- Start with p=none, read the reports and only then tighten the policy.
Sources and further reading
Based on the Dutch course reviewed on 25 November 2026. These sources are in English.