Skip to content
Desirly

IT, servers & security

Email Deliverability: SPF, DKIM and DMARC Explained

What SPF, DKIM and DMARC are, how they work together to stop spoofing and keep your business emails out of spam folders, and how to roll them out safely.

DE Desirly Editorial Team Published 5 min read

Cover illustration for the guide "Email Deliverability: SPF, DKIM and DMARC Explained"

SPF, DKIM and DMARC are three DNS records that prove emails claiming to come from your domain really came from you. SPF lists the services allowed to send email for your domain, DKIM adds a digital signature to each message, and DMARC tells receiving mail servers what to do with messages that fail those checks, and sends you reports. Set up together, they help your genuine emails reach the inbox and make it much harder for criminals to impersonate your business.

Why this matters for a small business

  • Deliverability. Big mailbox providers such as Gmail and Outlook.com check authentication, and they've tightened their requirements for bulk senders in recent years. Missing or broken records can send your invoices and quotes to spam, or get them rejected.
  • Spoofing. Without these records, it's easy for someone to send email that appears to come from your domain, such as a fake invoice with "new bank details" sent to your customers.
  • Trust. Customers, suppliers and banks are more likely to trust email from a domain that's properly authenticated.

The UK's National Cyber Security Centre publishes guidance on email security and anti-spoofing if you want to read more.

SPF, DKIM and DMARC at a glance

Record What it does Where it lives
SPF Lists which servers may send email for your domain A TXT record on your domain
DKIM Signs each email so receivers can check it wasn't forged or altered Records under a "selector" on your domain
DMARC Sets a policy for failed checks and sends you reports A TXT record at _dmarc.yourdomain

SPF (Sender Policy Framework)

SPF is a single TXT record listing the services allowed to send email using your domain. If your business email runs on Microsoft 365 and nothing else, it looks like this:

v=spf1 include:spf.protection.outlook.com -all

If you also send through a newsletter platform or invoicing software, you add that provider's include, using the exact value from their help pages:

v=spf1 include:spf.protection.outlook.com include:spf.newsletter-provider.example -all

Key rules:

  • Only one SPF record per domain. Two separate SPF records make SPF fail. Combine everything into one.
  • Ten DNS lookups maximum. Each include uses at least one. Go over the limit and SPF fails.
  • -all versus ~all. -all says "reject anything not listed", while ~all says "treat it as suspicious". Many businesses start with ~all while they check every sender is listed.
  • SPF can break when email is forwarded, which is one reason DKIM matters too.

DKIM (DomainKeys Identified Mail)

With DKIM, the sending service signs each email with a private key. You publish the matching public key in your DNS, and the receiving server uses it to check the signature. A valid signature shows the message really was sent for your domain and wasn't changed on the way. DKIM usually survives forwarding.

In Microsoft 365, setting up DKIM for your own domain typically means adding two CNAME records, one for each selector, that point to Microsoft, then switching on DKIM signing for the domain in Microsoft's security portal. Every other service that sends email as your domain, such as a newsletter tool or CRM, has its own DKIM setup steps.

DMARC (Domain-based Message Authentication, Reporting and Conformance)

DMARC builds on SPF and DKIM. It checks that the domain which passed SPF or DKIM matches the domain in the "From" address your recipients see. This is called alignment. It then applies your policy and sends you reports.

A sensible starting record:

v=DMARC1; p=none; rua=mailto:[email protected]

The three policies:

  • p=none. Monitor only. Nothing is blocked, but you receive reports.
  • p=quarantine. Failing messages are treated as suspicious, usually sent to spam.
  • p=reject. Failing messages are refused outright.

The reports arrive as XML files that aren't easy to read by eye. A DMARC reporting service turns them into a readable summary of who is sending email as your domain.

A safe step-by-step rollout

  1. List every service that sends email as your domain. Think about your email platform, website contact forms, online shop notifications, newsletters, accounting or invoicing software, CRM, helpdesk, and even scanners that email documents.
  2. Build one SPF record that covers them all, and check you're within the ten-lookup limit.
  3. Turn on DKIM for each service that supports it.
  4. Publish DMARC with p=none and a reporting address.
  5. Read the reports for a few weeks. Fix any legitimate service that's failing.
  6. Move to p=quarantine.
  7. Move to p=reject once you're confident every genuine sender passes.

If you own domains you never send email from, protect them too with v=spf1 -all and a DMARC record set to p=reject.

A worked example

Imagine a small online shop. Staff email runs on Microsoft 365, newsletters go through a mailing platform, and order confirmations come from the website. After step 4, the DMARC reports show the order emails failing. The website was sending directly from its own web server, which wasn't in the SPF record and wasn't signing with DKIM. The fix is to send website email through an authenticated service that signs with DKIM for your domain, which is often a job for whoever manages your web or mail server. Only once those emails pass does the shop move on to p=quarantine. Without the monitoring stage, those order confirmations could have started landing in spam.

Common mistakes

  • Publishing two SPF records instead of combining them
  • Jumping straight to p=reject on day one
  • Forgetting about the website's contact form or shop emails
  • Pasting records with curly quotes or stray spaces
  • Assuming it's done for good. Every new tool that sends email needs adding.

Frequently asked questions

Do I need all three records?

Ideally, yes. They do different jobs and DMARC depends on SPF and DKIM, so together they give the strongest protection.

Will SPF, DKIM and DMARC stop my emails going to spam?

They help, but they don't guarantee inbox delivery. Your sending reputation, content and how recipients engage with your emails matter too.

How long do DNS changes take to work?

Often minutes to a few hours, though it can take longer depending on the record's time-to-live setting.

How can I check whether my records are working?

Send an email to a Gmail account and choose "Show original". It shows whether SPF, DKIM and DMARC passed. Our Microsoft 365 setup essentials post covers the rest of a solid email setup.

If you'd like your domain's email authentication set up and monitored for you, our Microsoft 365 email service includes SPF, DKIM and DMARC.

This guide is general information, not legal, tax or financial advice. Fees, rules and thresholds change, so check the official source before you act. Spotted something out of date? Tell us and we will review it.

Keep reading

Your cookie choices

We use essential cookies to run this site. With your permission we would also use Google Analytics to see which pages help people. Cookie notice

Settings