E-Shot Media Practical guides to email newsletters

Deliver

SPF, DKIM and DMARC explained simply

What the three email authentication records do, what they look like in DNS, and the order to set them up in.

Updated 7 min read

When your newsletter lands in someone’s inbox, the receiving mail server has to decide whether it really came from you. Anyone can type your address into the “From” line of an email, in the same way that anyone can write your return address on the back of an envelope. SPF, DKIM and DMARC are the three DNS records that let receiving servers check the claim.

They sound technical, and the records look like line noise, but the ideas are simple. You set them up once, in the same place you manage your domain’s DNS (usually your domain registrar or hosting control panel), and then mostly leave them alone. Since 2024, Gmail and Yahoo have required them for anyone sending in volume, so they are no longer optional extras. This guide explains what each one does, shows what the records look like, and gives you a sensible order to set them up in.

The short version

RecordWhat it answersWhere it lives
SPFWhich servers are allowed to send mail for this domain?A TXT record on the domain itself
DKIMWas this message signed by the domain, and has it been changed since?A TXT (or CNAME) record at selector._domainkey
DMARCDo SPF or DKIM match the visible From address, and what should happen if they don’t?A TXT record at _dmarc

Throughout this guide we use example.co.uk as the domain and your-provider.example as a stand-in for your email service. Your provider will give you the real values to use.

SPF: the list of permitted senders

SPF (Sender Policy Framework) is a single TXT record that lists the servers allowed to send email using your domain. When a message arrives, the receiving server looks at the address used in the behind-the-scenes “envelope” (the return path, where bounces go), fetches the SPF record for that domain and checks whether the sending server is on the list.

A typical SPF record for a small organisation that uses Microsoft 365 or Google Workspace for day-to-day email and a newsletter service for campaigns looks something like this:

Host/name:  example.co.uk   (often shown as @)
Type:       TXT
Value:      v=spf1 include:_spf.your-mailbox-host.example include:_spf.your-provider.example ~all

Reading it left to right: v=spf1 says this is an SPF record. Each include: pulls in the list of servers published by a service you use. ~all means “anything not listed should be treated with suspicion” (a soft fail). -all is stricter and means “reject anything not listed”. Many organisations start with ~all and let DMARC do the enforcement later.

Two rules that catch people out

  • Only one SPF record per domain. If you add a second v=spf1 record for a new service, both can fail. Add the new include: to your existing record instead.
  • The ten-lookup limit. The SPF standard, RFC 7208, limits an SPF check to ten DNS lookups. Each include:, a, mx and redirect counts, and includes can contain further includes. Pile in too many services and SPF returns an error. If you are close to the limit, remove services you no longer use before adding new ones.

DKIM: a tamper-evident signature

DKIM (DomainKeys Identified Mail) adds a digital signature to each message. Your sending service signs the message with a private key it keeps secret, and you publish the matching public key in DNS. The receiving server uses the public key to check the signature. If it checks out, the receiver knows the message was signed by someone controlling the domain and that the signed parts (including the headers and body) haven’t been altered in transit.

The public key is published under a selector, a label your provider chooses, so you can have several DKIM keys for different services at once. The record sits at selector._domainkey.example.co.uk. Providers do it in one of two ways.

Option 1: a TXT record containing the key

Host/name:  news1._domainkey   (i.e. news1._domainkey.example.co.uk)
Type:       TXT
Value:      v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...

The long string after p= is the public key. Copy and paste it exactly. Some DNS panels split long values into chunks; that is normal.

Option 2: a CNAME pointing at your provider

Host/name:  news1._domainkey
Type:       CNAME
Value:      news1.dkim.your-provider.example

With a CNAME, your provider hosts the key and can rotate it without you touching DNS again. If you are offered a choice, this is usually the lower-maintenance one.

DMARC: tying it to the From address

SPF and DKIM each prove something about a domain, but not necessarily the domain your reader sees in the From line. A spammer could pass SPF for their own domain while putting your address in the From field. DMARC (Domain-based Message Authentication, Reporting and Conformance) closes that gap. It is defined in RFC 7489.

DMARC passes when at least one of SPF or DKIM passes and the domain it passed for matches (“aligns with”) the domain in the visible From address. By default the match is relaxed, so news.example.co.uk aligns with example.co.uk. Your DMARC record also tells receivers what to do with mail that fails, and where to send reports.

Start with a monitoring-only record:

Host/name:  _dmarc   (i.e. _dmarc.example.co.uk)
Type:       TXT
Value:      v=DMARC1; p=none; rua=mailto:dmarc-reports@example.co.uk
  • p=none means “don’t change how failing mail is handled, just tell me about it”.
  • rua= is the address that receives aggregate reports: XML files, usually daily, listing which servers sent mail claiming to be from your domain and whether they passed. Use a dedicated mailbox, because reports can pile up.

Moving towards enforcement

Once your reports show that all your legitimate senders (mailboxes, newsletter tool, booking system, invoicing software, website contact form) are passing and aligned, you can tighten the policy:

v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc-reports@example.co.uk
v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.co.uk
v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.co.uk

quarantine asks receivers to treat failing mail as suspicious, usually sending it to spam. reject asks them to refuse it outright. The optional pct= applies the policy to a percentage of failing mail, so you can step up gradually. Take your time: moving to reject before you have found every service that sends as you is the quickest way to lose your own invoices or password-reset emails.

A sensible order to set things up

  1. List everything that sends email as your domain. Mailboxes, newsletter service, shop platform, CRM, ticketing or booking tools, accounting software, website forms. This list is the real work.
  2. Fix SPF. One record, with an include for each service that needs it, and within ten lookups.
  3. Switch on DKIM for each service. Add the TXT or CNAME records your providers give you and confirm in each provider’s dashboard that DKIM is verified.
  4. Publish DMARC at p=none with a reporting address.
  5. Read the reports for a few weeks. Look for legitimate services that fail and fix them.
  6. Tighten gradually to quarantine and, if you are confident, reject.

DNS changes can take a while to spread, so allow time between adding a record and testing it.

How to check it is working

The simplest check costs nothing. Send a campaign or test message from your newsletter tool to a personal Gmail or Outlook.com address, open it and view the original message or message source (in Gmail, the three-dot menu then “Show original”). Look for the Authentication-Results header. You want to see something like:

Authentication-Results: mx.example-receiver.com;
       dkim=pass header.d=example.co.uk header.s=news1;
       spf=pass smtp.mailfrom=bounce.example.co.uk;
       dmarc=pass (p=NONE) header.from=example.co.uk

Check three things: spf=pass, dkim=pass with header.d= showing your domain (not only the provider’s), and dmarc=pass. If DKIM passes only for your provider’s domain, your custom-domain DKIM isn’t set up yet, and DMARC will be relying on SPF alone.

Example

A hypothetical sports club’s DMARC reports show its newsletter tool and mailboxes passing, but its membership system, which sends renewal reminders “from” the club’s address, failing. It adds that system’s DKIM record before moving to p=quarantine.

What these records do not do

Authentication proves who sent a message. It doesn’t prove anyone wanted it. A perfectly authenticated email that people mark as spam will still end up in spam folders. Treat SPF, DKIM and DMARC as the entry ticket, then read deliverability basics for the rest: the bulk-sender rules, complaint rates, warming up and list hygiene. Unfamiliar terms are explained in the glossary.