← All guides
Review 2 min read

Do your e-mails arrive? Check SPF, DKIM and DMARC in ten minutes

Why mails end up in spam or can be forged, which three DNS records prevent it and how to look them up yourself.

  • E-Mail
  • DNS
  • Security

Why it matters

Large mailbox providers such as Gmail, Outlook or GMX check every mail for whether the sender may send on behalf of your domain at all. Without the right records, invoices and offers end up in spam or are rejected outright.

The other way round, without these records anyone can send mails that look as if they came from you. That is why our website reviews check this every time, even when the website itself is fine.

The three records

All three are TXT records in your domain's DNS and are maintained at your domain or mail provider.

  1. SPF ( v=spf1 … ) on the domain itself: lists which servers may send for you. There may be only one SPF record, and it should end with -all or ~all .
  2. DKIM under <selector>._domainkey : a public key receivers use to check the signature of every mail. Your mail provider tells you the selector.
  3. DMARC under _dmarc ( v=DMARC1; p=… ): tells receivers what to do with mails that fail SPF and DKIM, and where reports go.

Look it up yourself

A terminal on any computer is enough. On Windows the tool is called nslookup , on macOS and Linux dig works too. Replace example.com with your domain and selector1 with your provider's selector.

nslookup -type=txt example.com
nslookup -type=txt _dmarc.example.com
nslookup -type=txt selector1._domainkey.example.com
nslookup -type=mx example.com

Typical mistakes

  1. Two SPF records because a new service simply added another one. Then neither counts.
  2. A newsletter or shop service sends mails but is not in SPF and does not sign with DKIM.
  3. DMARC stays on p=none forever. That is a good start for watching, but it does not stop forgeries; after a few weeks without problems move to quarantine and later reject .
  4. The domain sends no mail at all but has no SPF record either. For such domains v=spf1 -all together with p=reject protects against abuse.

If you'd rather not do it yourself

In a website review we check the e-mail setup too and write down exactly which record is missing and what it has to look like. You can then pass that on to your provider.