29 Oct 2026 · 5 min read · Kitlantis team

Why your emails land in spam: SPF, DKIM and DMARC explained

Why your emails land in spam: SPF, DKIM and DMARC explained: Kitlantis cover

You send an invoice, a quotation or a reply to a customer, and it never arrives. Or it arrives, but in the spam folder, where nobody looks. Most of the time there is nothing wrong with the message itself. The problem is that the receiving server cannot tell whether it really came from you.

Why receiving servers are suspicious

Email was designed in the 1980s for a small network of people who trusted each other. Anyone can still write any address in the From line, in the same way anyone can write any return address on a paper envelope. Fraudsters do this every day to send fake invoices and password reset messages in someone else's name.

So before they trust a message, Gmail, Outlook, Yahoo and company mail servers look up three records that your domain publishes in DNS: SPF, DKIM and DMARC. When they are missing or wrong, your mail is more likely to be filtered. Since 2024, Gmail and Yahoo have required all three from anyone who sends mail in bulk, and they treat mail from domains without them with more suspicion in general.

SPF: who is allowed to send for you

SPF is a single TXT record on your domain that lists the servers allowed to send mail with your address. A domain that uses Google Workspace for its mail might publish:

v=spf1 include:_spf.google.com ~all

The include part means "and every server Google lists". The ending matters: ~all asks receivers to treat mail from any other server as suspicious, and -all asks them to reject it. The usual mistakes are:

  • Two SPF records. When a newsletter or billing service is added, someone often creates a second record starting v=spf1 instead of adding to the first. A domain must have exactly one; with two, every SPF check fails.
  • Too many lookups. Each include, a and mx costs a DNS lookup, including the ones inside the services you include, and the total may not go over 10. Three or four services can reach the limit, and past it receivers treat the record as broken.
  • Ending in +all. This tells the world that any server may send as you, which is worse than having no record at all.

DKIM: a signature on every message

DKIM signs each message you send with a private key held by your email provider. The matching public key is published in your DNS under a selector name, such as google._domainkey.yourdomain.com. The receiving server fetches the key and checks the signature. If the signed parts of the message were changed on the way, or the key does not match, the check fails.

DKIM usually has to be switched on in your email provider's admin console, which then shows you a TXT record to add. It is the step most often forgotten, because mail still flows without it, just with less trust. Where you have a choice, use a 2048-bit key; many older set-ups still use 1024-bit keys, which are now considered weak.

DMARC: what to do when the checks fail

SPF and DKIM tell the receiver whether a message passed. DMARC tells it what to do when a message does not, and asks for reports. It is a TXT record at _dmarc.yourdomain.com, for example:

v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com

DMARC also checks alignment: the domain in the From line must match the domain that passed SPF or DKIM. This is what stops a fraudster from passing SPF with their own domain while showing yours to the reader.

The policy, p=, has three settings: none only watches and reports, quarantine sends failing mail to spam, and reject refuses it. Start with none and read the reports for two or three weeks. They show every service sending mail as your domain, including ones you forgot about. Fix those, then move to quarantine, and finally to reject.

Check your domain in one go

The Email Set-up Checker reads your MX, SPF, DKIM and DMARC records together and marks each finding as good, worth fixing or a problem, with the fix in plain words. It counts SPF lookups through every include, tries the usual DKIM selectors, reads the key size, and recognises providers such as Google Workspace, Microsoft 365 and Zoho from your MX records. To see a single record exactly as DNS returns it, use the DNS Lookup.

A short checklist

  1. One SPF record, listing every service that sends as you, ending in ~all or -all, with no more than 10 lookups.
  2. DKIM switched on with every service that sends as you, with 2048-bit keys where possible.
  3. A DMARC record with an rua address for reports, moving from none to quarantine to reject.
  4. MX records that point to mail servers which exist, so replies reach you.

A DNS change can take an hour or more to be seen everywhere, depending on the record's TTL. The DNS Propagation Checker shows which public resolvers already have the new answer.

Check your own domain with the Email Set-up Checker. It only reads public DNS records, so it never sends, reads or stores any email.

Tools used in this guide

More articles

All articles →