Learn

Email authenticationfrom the ground up.

SPF, DKIM and DMARC are the three protocols that prove an email is legitimate. When they are missing or misconfigured, mail lands in spam or gets rejected. These guides explain how each one works, what can go wrong, and how to fix it.

The three protocols

SPF, DKIM and DMARC.

How SPF works

SPF declares which servers may send mail for a domain. A TXT record in DNS lists IP addresses and includes, and a receiver evaluates them in order.

How DKIM works

DKIM attaches a cryptographic signature to each message. The receiver fetches the public key from DNS and verifies that the message was not altered after signing.

How DMARC works

DMARC ties SPF and DKIM together by requiring that at least one of them aligns with the From header domain. It tells receivers what to do when neither does.

Deep dives

The details that trip people up.

SPF, DKIM and DMARC alignment

Authentication alone is not enough. DMARC requires that the domain authenticated by SPF or DKIM matches the domain in the From header the recipient sees.

DKIM selectors explained

A selector is the label that tells the receiver which public key to fetch from DNS. Different services use different selectors, and rotating them is how you change keys without downtime.

The SPF 10-lookup limit

Every include, a, mx, ptr and exists mechanism in an SPF record costs one DNS lookup. The specification caps the total at ten, and exceeding it is a permanent error.

DMARC aggregate reports

Aggregate reports are XML files that receiving domains send to the address in your rua tag. They show who is sending mail as your domain, and whether it passes or fails.

Test yours

Free tools, no account needed.