SPF, DKIM and DMARC are three DNS records that prove an email really comes from your domain. SPF lists the servers allowed to send for you, DKIM signs each message, and DMARC tells other mail servers what to do when a message fails both. Gmail and Yahoo now require them from senders, so they decide whether your newsletters reach the inbox. This article is part of our email marketing guide for small businesses; every rule below comes from Google's, Yahoo's or the standard's own pages, checked on 29 October 2026.
Why these records matter now
Without them, anyone can put your domain in the From line of a scam email, and mail servers have no way to tell the real thing from the fake. Gmail's sender guidelines require every sender to set up SPF or DKIM. Senders of about 5,000 or more messages a day to personal Gmail accounts must set up both, plus DMARC, and the From domain must match the domain SPF or DKIM checked. Yahoo's Sender Hub sets the same bar for bulk senders. Our guide to the Gmail and Yahoo bulk-sender rules covers the rest of those requirements.
SPF: who may send for your domain
What it is. A TXT record on your domain that lists the services allowed to send email as you. Google's help page puts it simply: receiving servers check the record to confirm that mail claiming to come from your domain was sent by servers you authorised.
What it looks like. Google's example for Google Workspace:
v=spf1 include:_spf.google.com ~all
Read it left to right: "this is SPF version 1; Google's servers may send for me; treat anything else as suspicious". Each email service you use (your mailbox provider, your newsletter tool, your shop's order emails) gives you its own include: part.
The endings. The standard (RFC 7208) defines -all as fail, ~all as softfail and ?all as neutral. Google recommends ~all, which its help page says tells receiving servers to mark mail from unlisted servers as spam.
Mistakes that break SPF:
- Two SPF records. The standard says a domain must not have more than one; if it has two, the check returns a permanent error. When you add a new service, edit the existing record and add another
include:, rather than creating a second record. - Too many lookups. SPF stops at 10 terms that need DNS queries (
include,a,mx,ptr,exists,redirect); going over is also a permanent error. Google's page says a record can have up to 10include:tags. If you use many services, remove the ones you no longer use. - Forgetting a sender. If your booking system or shop sends email "from" your domain and is not in the record, its mail fails SPF.
DKIM: a signature on every message
What it is. Your email service signs each outgoing message with a private key. You publish the matching public key as a TXT record in your DNS, and receiving servers use it to check the signature. Google's help page says DKIM protects your domain against spoofing by authenticating your email with that signature.
What you do. In your email service's settings, generate a DKIM key and copy the record it gives you into your DNS. Google offers 2048-bit keys and 1024-bit keys for domain hosts that cannot take the longer one; Gmail's sender guidelines ask for at least 1024 bits and recommend 2048.
Selectors. Each key has a name called a selector, which becomes part of the record's host name. Google's default selector is google. A second service gets its own selector, so several DKIM keys can live side by side, which is the main practical difference from SPF.
DMARC: what to do when checks fail
What it is. A TXT record at _dmarc.yourdomain.com that tells receiving servers what to do with mail that fails SPF and DKIM, and where to send reports. Google's help page says a message passes DMARC when it passes SPF or DKIM and the passing domain matches the domain in the visible From line. That match is called alignment.
The three policies:
| Policy | What Google says receiving servers do |
|---|---|
p=none | Deliver the message normally and log it in the daily report |
p=quarantine | Send it to the spam folder |
p=reject | Refuse it, usually with a bounce to the sender |
Reports. The rua= tag names the addresses that receive daily aggregate reports. Google recommends adding it and sending the reports to a dedicated mailbox, group or reporting service, because there can be a lot of them.
A starting record, built from the tags on Google's page (replace the domain with yours):
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
Gmail's bulk-sender rules accept p=none, and Yahoo asks for at least p=none. Google's rollout advice is to start there, read the reports, fix the senders that fail, and then move towards quarantine or reject, using the pct= tag to apply the stricter policy to a growing share of mail until it reaches 100.
Alignment. Google says relaxed alignment (the default) usually gives enough protection, while strict alignment can cause mail from your own subdomains to be rejected or marked as spam. Yahoo also accepts relaxed alignment.
A safe order for a small business
- List every service that sends email as your domain: mailbox, newsletter tool, online shop, booking system, invoicing tool.
- SPF: build one record with an
include:for each, ending in~all. - DKIM: turn it on in each service and publish each key.
- Wait. Google advises waiting 48 hours after setting up SPF and DKIM before you turn on DMARC.
- DMARC: publish
p=nonewith aruaaddress. - Read the reports for a few weeks. Any service you forgot will show up failing. Add it, or stop it sending as your domain.
- Tighten to
quarantine, thenreject, step by step withpct, if your reports are clean.
Checking your work
- On your phone. Gmail's help page on authenticated messages says to open the email, then "View details" and "View security details". An authenticated message shows a "Mailed by" line with your domain and a "Signed by" line with the sending domain.
- On a computer. Gmail's "Show original" (under More, next to Reply) opens the full header, which you can copy into a header checker.
- DMARC reports. After a few days, your
ruamailbox shows which services pass and which fail.
Common questions
Do I need all three if I send only a few emails? Gmail asks every sender for SPF or DKIM. DMARC is required at the bulk level, but setting it up early with p=none costs nothing and protects your name from spoofers.
My web host says SPF is "already set up". Is it? Only for the servers it knows about. Check that your newsletter and shop tools are in the same single record.
Does DMARC stop my emails going to spam? No. It proves who sent them. Whether people want them still matters, and Gmail and Yahoo both watch spam complaints.