Humanfrog Lab

SPF, DKIM and DMARC: is your e-mail domain protected against spoofing?

Anyone can send an e-mail with your address in the From field. Without the right DNS records, receiving servers cannot tell your real invoices and payment instructions from forged ones, and your own mail ends up in spam more often. Gmail and Yahoo also require authentication from every sender, and full SPF, DKIM and DMARC from bulk senders.

Three records protect your domain: SPF lists the servers allowed to send, DKIM signs every message and DMARC tells receivers what to do with mail that fails and reports back to you. Enter your domain below to see which records you have, what is wrong with them and which record to publish next.

Are SPF, DKIM and DMARC on your domain set up correctly?

Enter your domain or an e-mail address. The checker reads MX, SPF, DKIM, DMARC, MTA-STS and BIMI and suggests the next step. To do this, your browser sends only the domain name and the DNS names derived from it to the public DNS resolvers of Cloudflare and Google; nothing else leaves your browser.

The calculation runs in your browser. Your answers are only sent if you submit the contact form below.

Why e-mail spoofing still works

The protocol that carries e-mail (SMTP) was designed without any check of who the sender really is. Anyone can send a message with your address in the From field, from any server in the world. That is why invoice fraud, fake payment instructions and phishing in the name of a supplier or a managing director still work so well.

Three DNS records close this gap. SPF says which servers may send mail for your domain, DKIM adds a cryptographic signature to each message, and DMARC tells receivers what to do when a message fails both checks and sends you reports about it. None of them is useful on its own: real protection only comes when all three work together and DMARC is at enforcement.

The checker above reads these records from public DNS and shows, for each one, whether it is in order and which record to publish next.

SPF: which servers may send for you

SPF (RFC 7208) is a TXT record at the root of the domain, for example v=spf1 include:spf.protection.outlook.com -all. The receiving server checks whether the sending IP address is on the list. Three rules cause most problems:

  • Exactly one record. Two records starting with v=spf1 do not add up; they produce a permanent error (permerror) and SPF fails for all mail. When you add a new service, extend the existing record instead of creating a second one.
  • No more than 10 DNS lookups. Every include, a, mx, exists and redirect, including those nested inside included records, counts towards a limit of 10. A few marketing and CRM services can exceed it quickly. The checker estimates the count by following the includes.
  • A sensible ending. -all (reject unlisted senders) and ~all (mark them as suspicious) are both fine when DMARC is in place. ?all gives no protection and +all allows the whole internet to send in your name.

SPF has one weakness: it checks the technical envelope sender, not the From address the recipient sees, and it breaks when a message is forwarded. That is why it needs DKIM and DMARC.

DKIM: a signature that survives forwarding

With DKIM (RFC 6376) the sending server signs each message with a private key, and the receiver verifies the signature with the public key published in DNS at <selector>._domainkey.yourdomain. The signature also survives most forwarding, so DKIM is usually the more reliable basis for DMARC.

The selector is a free-form name chosen by the provider. Microsoft 365 uses selector1 and selector2, published as CNAME records pointing to Microsoft. Google Workspace uses google by default. Newsletter and CRM platforms each have their own. Because selectors cannot be listed from DNS, a checker can only probe common names. If it finds nothing, look at the DKIM-Signature header of a message you sent: the s= tag is your selector, and you can enter it in the tool.

Use 2048-bit RSA keys where your provider allows it. Google recommends 2048 bits in its sender guidelines, and Microsoft 365 lets you move from 1024 to 2048 bits at the next key rotation.

DMARC: the policy that ties it together

DMARC is a TXT record at _dmarc.yourdomain. A message passes DMARC when SPF or DKIM passes and the domain they verify matches (is aligned with) the domain in the visible From address. The record also states a policy for messages that fail:

PolicyWhat receivers doWhen to use it
p=noneDeliver normally, send reportsThe first two to four weeks, to find all legitimate senders
p=quarantinePut failing mail in spamWhen the reports show your own mail passes
p=rejectRefuse failing mailThe target state for every domain

The rua tag sets the address for aggregate reports, XML files in which receivers list which servers sent mail in your name and whether it passed. Without them you are working blind, so always start with p=none and a rua address, for example v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain. A DMARC report service makes the XML readable.

In May 2026 the IETF published RFC 9989, which replaces the original DMARC specification RFC 7489. Existing v=DMARC1 records keep working. The most visible changes are that the pct tag has been removed and replaced by a test flag t=y, and that a new np tag sets the policy for non-existent subdomains.

What Gmail and Yahoo require

Since February 2024, Gmail has required every sender to set up SPF or DKIM. Senders of more than 5,000 messages a day to Gmail accounts must have both SPF and DKIM, a DMARC record (the policy can be none), a From domain aligned with SPF or DKIM, one-click unsubscribe for marketing mail and a spam rate below 0.3%. Yahoo sets practically the same rules for bulk senders. Even if you send less, these rules show where the market is heading: unauthenticated mail increasingly ends up in spam or is rejected.

Common mistakes we see

  • Forgotten senders. The ERP sends invoices, the web shop sends order confirmations, the helpdesk sends tickets, and none of them is in SPF or signs with DKIM. They show up in the DMARC reports as soon as you start reading them.
  • Staying at p=none for years. Monitoring is a phase, not protection. Plan the move to quarantine and reject with dates.
  • Weak subdomain policy. sp=none next to p=reject lets attackers send from invented subdomains.
  • Unprotected parked domains. Domains that send no mail need v=spf1 -all and v=DMARC1; p=reject, otherwise they are ideal for spoofing.
  • Two SPF records after a provider change, and SPF records over the lookup limit.

A safe path to p=reject

  1. List every service that sends mail in your name.
  2. Publish one SPF record and enable DKIM for the main mail system and each service.
  3. Publish DMARC with p=none and rua, and read the reports for two to four weeks.
  4. Fix the senders that fail alignment, then move to p=quarantine.
  5. When the reports stay clean, move to p=reject and keep monitoring.

Protecting your domain against spoofing is a sensible part of the cyber risk management measures that NIS2 requires. If you want to know whether the directive applies to you, see the guide NIS2 directive, and for a broader check of your defences the cyber-attack readiness assessment.

Humanfrog sets up and manages Microsoft 365 and e-mail security, including SPF, DKIM, DMARC reporting and the step-by-step move to p=reject without lost mail. To review your result with an expert, write to us.

Frequently asked questions

What is the difference between SPF, DKIM and DMARC?
SPF lists the servers that may send mail for your domain. DKIM adds a cryptographic signature to each message that the receiver verifies with a public key in DNS. DMARC requires that SPF or DKIM passes with a domain aligned with the visible From address, tells receivers what to do with mail that fails and sends you reports.
Is p=none enough?
No. With p=none receivers still deliver forged messages; you only receive reports. It is the right first step for two to four weeks, after which you should move to p=quarantine and then p=reject once the reports show that all your legitimate mail passes.
Why does the checker not find my DKIM key?
DKIM keys are published under a selector name chosen by your provider, and DNS does not allow selectors to be listed. The checker probes common selectors such as selector1, selector2 and google. Find your selector in the DKIM-Signature header (s= tag) of a message you sent and enter it in the tool.
What happens if SPF needs more than 10 DNS lookups?
RFC 7208 limits SPF evaluation to 10 terms that require a DNS lookup. If the limit is exceeded, receivers return a permanent error and SPF fails even for legitimate mail. Remove unused includes, replace some with IP ranges or move bulk sending to a subdomain with its own SPF record.
What do Gmail and Yahoo require from senders?
Since February 2024 Gmail has required all senders to use SPF or DKIM. Senders of more than 5,000 messages a day to Gmail must use SPF and DKIM, publish a DMARC record (p=none is enough), align the From domain, offer one-click unsubscribe for marketing mail and keep the spam rate below 0.3%. Yahoo has practically the same requirements for bulk senders.
Does the checker send my data anywhere?
Only the domain name and DNS names derived from it, such as _dmarc.yourdomain, are sent to the public DNS-over-HTTPS resolvers of Cloudflare and, as a fallback, Google. DNS records are public anyway. The result is sent to Humanfrog only if you submit the contact form yourself.

Stay up to date

Regulations, licence prices and technology change fast. When we update the guides and tools in the Lab or publish a new article, we let you know by e-mail. Occasional, and never spam.

Subscribe to the newsletter