Skip to content
SEO Optimizer is live, Audit on page SEO and AI-search readiness. Try it free
Security

Email Authentication: SPF, DKIM, DMARC and MTA-STS

·5 min read

Email was designed without any way to prove who sent a message. Email authentication is the set of DNS records that adds that proof after the fact. SPF says which servers may send for your domain, DKIM signs each message, DMARC ties them to the address people see and says what to do when checks fail, and MTA-STS makes sure mail to you travels encrypted. Since 2024 Google and Yahoo require email authentication for bulk senders, and Microsoft followed for Outlook.com in 2025. Without it, your mail lands in spam and anyone can pretend to be you.

RecordLives atProtects
SPFTXT on example.comWhich servers may send mail for the domain
DKIMTXT on selector._domainkey.example.comThat a message was signed by the domain and not changed
DMARCTXT on _dmarc.example.comThe visible From address, with a policy and reports
MTA-STSTXT on _mta-sts.example.com plus a policy fileEncryption of mail sent to your domain
TLS-RPTTXT on _smtp._tls.example.comReports about failed encrypted delivery

SPF: The First Layer of Email Authentication

SPF (Sender Policy Framework) is a TXT record listing the servers and services allowed to send mail for your domain, ending in ~all or -all. You need exactly one, it must stay under 10 DNS lookups, and it checks the hidden envelope sender rather than the From address. The SPF record guide covers the common mistakes.

DKIM: A Signature on Every Message

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each message. The receiving server looks up your public key in DNS and checks that the message was signed by your domain and not modified. Each sending service gets its own key under a selector:

google._domainkey.example.com TXTA DKIM public key record (shortened)
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
  • Turn on DKIM in every service that sends as your domain, and make sure it signs with your domain, not the provider's.
  • Use 2048-bit keys where the provider supports them.
  • Rotate keys occasionally by publishing a new selector before retiring the old one.

DMARC: Alignment, Policy and Reports

DMARC passes when SPF or DKIM passes for a domain that matches the From address. That alignment step is what actually stops spoofing. The policy then tells receivers what to do with failing mail: p=none to monitor, p=quarantine for spam, p=reject to block. Aggregate reports sent to your rua address show every source sending as your domain. The DMARC guide explains the record and a safe path to p=reject.

MTA-STS: Encrypted Delivery to You

SPF, DKIM and DMARC protect mail you send. MTA-STS (Mail Transfer Agent Strict Transport Security) protects mail sent to you. Without it, an attacker in the network path can strip the encryption between mail servers and read messages in transit. MTA-STS tells sending servers to require TLS and a valid certificate when delivering to your MX hosts. It needs two parts:

_mta-sts.example.com TXT1. A TXT record announcing the policy
v=STSv1; id=20261130
https://mta-sts.example.com/.well-known/mta-sts.txt2. The policy file, served over HTTPS
version: STSv1
mode: testing
mx: aspmx.l.google.com
mx: *.aspmx.l.google.com
max_age: 86400

Start in mode: testing, check reports, then switch to mode: enforce with a longer max_age. Change the id in the TXT record whenever you change the policy.

TLS-RPT: Reports on Encryption Failures

TLS-RPT is a TXT record at _smtp._tls.example.com, such as v=TLSRPTv1; rua=mailto:tls-reports@example.com. Sending servers use it to report when they could not deliver to you securely. Publish it alongside MTA-STS so you know if your policy is blocking mail.

Beyond the Basics: BIMI and ARC

  • BIMI shows your logo next to messages in supporting inboxes. It requires DMARC at p=quarantine or p=reject, and some inboxes, including Gmail, also require a verified mark certificate.
  • ARC lets forwarding services and mailing lists pass on authentication results, so forwarded mail is less likely to fail DMARC. It is set up by the forwarding service, not by you.

Bulk Sender Requirements

Google and Yahoo's rules for bulk senders (more than about 5,000 messages a day to Gmail) require SPF and DKIM, a DMARC record of at least p=none with alignment, a one-click unsubscribe for marketing mail, and a low spam complaint rate. Microsoft introduced similar requirements for high-volume senders to Outlook.com in 2025. Even smaller senders benefit, because the same email authentication signals decide inbox placement.

An Email Authentication Setup Order That Will Not Break Your Mail

  1. List every service that sends as your domain.
  2. Publish one SPF record that includes all of them, ending in ~all.
  3. Turn on DKIM with your own domain in each service.
  4. Publish DMARC at p=none with a rua report address.
  5. Fix any sender that fails in the reports, then move to p=quarantine and p=reject.
  6. Add MTA-STS in testing mode and TLS-RPT, then switch MTA-STS to enforce.
  7. Protect domains that never send email with v=spf1 -all and p=reject.

Check Your Email Authentication Records

A security scan checks your domain's email authentication in one pass: whether an SPF record exists, whether DKIM keys are published on common selectors used by Google, Microsoft, Zoho and others, whether DMARC exists and is still at p=none, and whether an MTA-STS record is published. It also reads your TLS-RPT record, and checks DNSSEC and CAA records for the domain. It checks the main domain even if you enter a www address. It cannot see DKIM keys on unusual selectors or read your DMARC reports, so use those reports to confirm every sender passes. For how findings are ranked, see how to read a security scan report.

FAQ

よくある質問

Email authentication is a set of DNS records, mainly SPF, DKIM and DMARC, that lets receiving servers check that a message really comes from the domain it claims and has not been changed.

Yes. Each covers a different gap, and DMARC needs SPF or DKIM to pass for the visible From domain. Google, Yahoo and Microsoft require all three for bulk senders.

MTA-STS is a policy that tells other mail servers to use encrypted, certificate-checked connections when delivering email to your domain. It prevents attackers from stripping encryption in transit.

MTA-STS sets the rule that delivery to you must be encrypted. TLS-RPT asks sending servers to send you reports when encrypted delivery fails, so you can spot problems with the policy.

Look up the SPF, DKIM, DMARC and MTA-STS records with dig or nslookup, check message headers in a received email, or run a security scan that checks them together.

Find out which headers you're missing

Run a free security scan and get a plain-English breakdown of every header, cert, and exposed secret.

Run a free security scan