SPF, DKIM and DMARC Explained: A Setup Guide
To set up SPF, DKIM and DMARC, publish three DNS records for your sending domain: an SPF TXT record listing who may send for you, a DKIM public key from your sending service, and a DMARC TXT record at _dmarc that starts at p=none with a reporting address. Confirm each passes and aligns with your From domain, then tighten DMARC step by step.

To set up SPF, DKIM and DMARC, publish three DNS records for your sending domain: an SPF TXT record listing who may send mail for you, a DKIM public key that receivers use to check your sending service’s signature, and a DMARC TXT record at _dmarc that starts at p=none with a reporting address. Do them in that order, confirm each passes and matches your From domain, then tighten DMARC to quarantine and, only if your reports are clean, to reject. Gmail, Yahoo and Outlook.com already require authentication from bulk senders, but passing is table stakes, not a promise of the inbox.
What are SPF, DKIM and DMARC, and why do they matter?
SPF lists the servers allowed to send mail for a domain, DKIM adds a signature showing a domain vouched for a message and that it wasn’t altered in transit, and DMARC checks that one of the two matches the From address people see and tells receivers what to do when neither does. They matter because mailbox providers use them to decide whether to accept your mail, and because without them anyone can forge your From address.
Passing all three proves who sent a message, not that it’s wanted. Spam complaints, list quality and content still decide inbox versus spam, and why emails land in spam covers those.
What does each record do?
Each record lives at a different DNS name, proves a different thing and breaks in different ways. DMARC is the only one that ties the other two to the address your recipients see.
| Record | What it proves | DNS record | What usually breaks it |
|---|---|---|---|
| SPF | The sending server’s IP is authorized for the domain in the envelope sender (the Return-Path), not the From address | TXT at the domain or a bounce subdomain, starting v=spf1 | Two SPF records, more than 10 lookups, a missing sender, forwarding |
| DKIM | A domain signed the message, and the signed parts haven’t changed since | TXT at selector._domainkey.example.com (some senders give a CNAME instead) | Wrong selector, a mangled key, a doubled domain name, edits after signing |
| DMARC | SPF or DKIM passed and the passing domain matches the From domain; also sets a policy and requests reports | TXT at _dmarc.example.com | Misalignment, forgotten senders, tightening too early, two DMARC records |
What is alignment?
Alignment is the match between the domain that passed SPF or DKIM and the domain in your From address. DMARC passes when either one passes and aligns, though Google and Microsoft both recommend aligning with both.
Under relaxed alignment, the default, the two domains only need to share an organizational domain, so a return-path of bounce.example.com aligns with a From address at example.com. A message signed with d=mailer.example.net can pass DKIM and still fail DMARC for example.com, because the domain that passed isn’t yours.
How do you set up SPF?
Publish one TXT record at your domain that starts with v=spf1, names every service that sends mail as you, and ends with ~all. Keep it to a single record and inside the lookup limit described below.
First list everything that sends as your domain: your mailbox provider, marketing and transactional senders, and tools like invoicing or help desk software. Then combine the include: values or IP ranges they publish into one record at the root.
example.com. 3600 IN TXT "v=spf1 include:_spf.example.net include:spf.example.org ip4:203.0.113.10 ~all"
An include: pulls in another domain’s authorized senders and ip4: allows an address directly. Some senders skip the include; utobo, for example, has you add a return-path CNAME that points a bounce subdomain at utobo so SPF passes for your domain.
Should you end with ~all or -all?
Start with ~all (softfail) and consider -all (fail) only once you’re sure the list is complete. RFC 7208 (2014) calls softfail a weak statement that a host is probably not authorized, and Google’s Workspace help recommends ~all. A hard -all can make some receivers reject mail early in the SMTP exchange, and RFC 9989 (2026) notes those rejections never appear in your DMARC reports.
What are the one-record and 10-lookup rules?
RFC 7208 (2014) allows only one SPF record per domain and at most 10 DNS lookups while evaluating it. Break either rule and the result is a permerror, so SPF can no longer help you pass DMARC.
The include, a, mx, ptr and exists mechanisms and the redirect modifier each count toward the 10; ip4, ip6 and all don’t. Includes nest, so one include can use several lookups. An include that points at a domain with no SPF record, such as a typo, is also a permerror, and the RFC recommends limiting lookups that return nothing to two.
Near the limit, remove services you no longer use, swap stable sections for ip4: ranges (a copied list goes stale when a provider changes addresses), or give a sender its own bounce subdomain, which gets its own lookup budget.
How do you set up DKIM?
Your sending service generates a key pair, you publish the public half in DNS at selector._domainkey.yourdomain, and the service signs every message with the private half. Copy the record exactly as given and check that the signing domain is yours.
The selector is a label, such as selector1, that lets one domain publish several keys, one per sending service. Selectors also make rotation safe: RFC 6376 (2011) describes publishing the new key under a new selector, switching signing to it, then removing the old record. Each signed message names its signing domain (d=) and selector (s=), which is how receivers find the record.
selector1._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."
RFC 8301 (2018) says signers must use RSA keys of at least 1024 bits and should use at least 2048. Google and Yahoo both require 1024 bits or more and recommend 2048 where your provider supports it. A single DNS string tops out at 255 characters (RFC 7208), and a 2048-bit key is longer than that, so it’s split into several quoted strings that receivers join back together.
How do you set up DMARC?
Publish a TXT record at _dmarc.yourdomain that starts with v=DMARC1; p=none and includes an rua reporting address, read the reports, fix every legitimate sender that fails, then move to quarantine and, if it suits you, reject. RFC 9989, the DMARC standard published in May 2026, follows the same order, with enforcement last.
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"
v=DMARC1must come first, or the record is ignored.pis the policy:none(monitor only),quarantine(treat failing mail as suspicious, usually the spam folder) orreject(ask receivers to refuse it).spsets a separate policy for subdomains; without it,pcovers them.ruais where receivers send aggregate reports, which are daily XML files that should be compressed (RFC 9990, 2026). Use a dedicated mailbox or group, as Google advises.adkimandaspfchoose relaxed (r, the default) or strict (s, exact match) alignment. Leave them relaxed; Google warns strict alignment can get mail from subdomains rejected or sent to spam.
What changed in RFC 9989?
RFC 9989 replaces the original DMARC specification, RFC 7489 (2015). Core tags such as p, sp, rua, adkim and aspf remain, so a record that uses only those should keep working. The tags pct (apply the policy to a percentage of failing mail), rf and ri are removed, a new t tag (y or n) takes over the testing role of pct, and np (policy for non-existent subdomains) and a DNS tree walk (replacing the public suffix list) are new.
With t=y, you ask receivers to treat failing mail one level softer than your published policy, so reject becomes quarantine. It’s brand new, so confirm in your reports that receivers honor it. Google’s Workspace rollout guide still uses pct in its sample record, so both styles are in circulation; prefer small, reversible steps.
How fast should you move from p=none to p=reject?
Slowly: spend about a week (Google’s rollout guide) to at least a month (RFC 9989, 2026) at p=none, then move to quarantine, and consider reject only once reports stay clean and every sender is DKIM-aligned.
| Stage | Record | How long | What to check |
|---|---|---|---|
| 1. Monitor | p=none plus rua | About a week (Google) to at least a month (RFC 9989, if you may go on to reject) | Every source sending as you, and whether it passes and aligns |
| 2. Quarantine | p=quarantine | Google phases it in with a small percentage and raises it gradually; RFC 9989 suggests as long as stage 1 before reject | Legitimate mail landing in spam, and unfamiliar sources |
| 3. Reject (optional) | p=reject | Only once reports stay clean and every sender is DKIM-aligned | Failing mail can be refused outright, so a forgotten sender loses mail |
RFC 9989 says a domain whose users might post to mailing lists should not publish p=reject, because list posts can fail authentication. It also says any domain at p=reject must DKIM-sign rather than rely on SPF alone. Google describes reject as optional, so staying at p=quarantine is a legitimate choice. These timings are rules of thumb, not requirements.
What do Gmail, Yahoo and Microsoft require from senders?
Since February 2024, Google and Yahoo have required SPF or DKIM from everyone sending to them, and SPF, DKIM and a DMARC record (p=none is enough) from bulk senders, with the From domain aligned to SPF or DKIM. Microsoft added a high-volume version for Outlook.com on May 5, 2025. Google and Microsoft put the bulk threshold at about 5,000 messages a day, while Yahoo publishes no number.
The table shows each provider’s published rules as of December 2026.
| Requirement | Gmail (Google) | Yahoo | Outlook.com (Microsoft) |
|---|---|---|---|
| SPF and DKIM | SPF or DKIM for all; both for bulk | SPF or DKIM for all; both for bulk | High-volume senders: both must pass |
| DMARC | Required for bulk; p=none accepted | Bulk: valid policy, at least p=none, must pass | High-volume senders: published record, p=none accepted, aligned pass |
| Spam complaints | Stay under 0.1%, never reach 0.3% | Stay under 0.3% | No number stated |
| Unsubscribe | One-click for marketing mail; honoring within 48 hours recommended | One-click for marketing mail; honor within 2 days | Easy-to-find opt-out recommended |
| Enforcement | Since February 2024; ramped up from November 2025, with temporary or permanent rejections | Rolled out from February 2024 | From May 5, 2025; Junk first per the announcement, rejection with error 550 5.7.515 per the support page |
Google’s email sender guidelines took effect February 1, 2024, and its FAQ says bulk-sender status never expires, so once you cross the threshold, assume the rules apply. The FAQ also says it’s likely that aligning DMARC with both SPF and DKIM will eventually be required, so align both now.
Yahoo’s sender best practices began enforcement in February 2024. Both providers limit one-click unsubscribe to marketing and subscribed mail, so transactional mail such as password resets is exempt; transactional vs marketing email shows where that line sits, and email marketing best practices covers list hygiene.
Microsoft’s support page for error 550 5.7.515 says mail from a non-compliant high-volume domain is rejected, while its April 2025 announcement described Junk-folder routing first. Plan for rejection.
How do you check that SPF, DKIM and DMARC are passing?
Send a test message from your sending service to a Gmail address, open it, choose More and then Show original, and look for spf=pass, dkim=pass and dmarc=pass with domains that match your From address. Then confirm the records with dig and watch your DMARC reports.
Show original includes the full headers, and the Authentication-Results header carries the verdicts. Google notes you can’t verify DKIM by emailing yourself, so use a different mailbox.
Authentication-Results: mx.example.net;
dkim=pass header.i=@example.com header.s=selector1;
spf=pass smtp.mailfrom=bounce@bounce.example.com;
dmarc=pass header.from=example.com
Here SPF passed for bounce.example.com and DKIM for example.com, and both align with the From domain, so DMARC passes. If those domains were mailer.example.net instead, SPF and DKIM could both pass while DMARC fails, because neither domain is yours.
To check the records directly, query each name:
dig +short TXT example.com
dig +short TXT selector1._domainkey.example.com
dig +short TXT _dmarc.example.com
The first should include exactly one v=spf1 record, the second your public key and the third one v=DMARC1 record. Then read your DMARC aggregate reports, which list every source sending as your domain and whether it passed and aligned; a free report parser turns the XML into a table.
What mistakes silently break authentication?
The usual culprits are two SPF records, more than 10 SPF lookups, a sender that signs only with its own domain, a mangled DNS entry and jumping straight to p=reject. Most fail silently: your mail still sends, but it quietly stops authenticating.
- Two SPF records. Adding a service by publishing a second
v=spf1record produces a permerror. Merge them into one. - More than 10 lookups. Nested includes push you over, and headers show
spf=permerror. - Misalignment. A pass for the vendor’s domain doesn’t help your From address; Microsoft’s troubleshooting steps ask you to confirm each service uses your domain in the return-path and DKIM signature.
- Forgotten senders and an early p=reject. Invoicing, help desk and CRM tools often send as your domain. RFC 9989 says to use aggregate reports to find and fix authentication gaps first, because at
p=rejectfailing mail can be refused outright. - Relying on SPF alone. Forwarding changes the sending IP, so SPF often fails after a forward. DKIM can survive it, unless a mailing list or gateway edits the message.
- DNS typos. Some hosts append your domain automatically, turning
selector1._domainkey.example.comintoselector1._domainkey.example.com.example.com, so verify the record after saving, as Google advises. - Two DMARC records. When more than one comes back for the same name, RFC 9989 tells receivers to discard them all, as if you had none.
None of these fixes a bad list. Authentication tells receivers who you are, not whether your recipients exist, and verifying addresses before you send covers that side.
How long do DNS changes take?
A new or changed record usually shows up within a few hours but can take up to 48 hours, according to GoDaddy’s help center. Google’s Workspace help says SPF and DKIM can take up to 48 hours to start working, and to wait 48 hours after setting them up before adding DMARC.
Caching sets the pace: resolvers keep an answer until its TTL expires, so a changed record can take as long as the old record’s TTL to appear everywhere. A new record can lag too, because resolvers also cache “not found” answers, for the lower of the SOA record’s MINIMUM field and its own TTL (RFC 2308, 1998). Lower the old TTL a day ahead, and confirm the new record resolves with dig before testing.
How utobo helps
utobo won’t send until you verify a sending domain. In the app, go to Account, then Domains, then Add Domain, enter your root domain and copy the records shown, which are unique to your account: a DKIM TXT record (required), a return-path CNAME that points a bounce subdomain at utobo so SPF passes for your domain (required) and a DMARC TXT record (suggested). A domain can hold only one DMARC record, so if yours already has one, edit it instead of adding a second, and keep your bounce rate under 1.5%, which is utobo’s own guidance. Transactional and Marketing plans start at $9 a month; see pricing.
Last updated: December 2026.
Frequently asked questions
What are SPF, DKIM and DMARC?
SPF lists the servers allowed to send mail for your domain, DKIM adds a signature that shows a domain vouched for the message and that it was not changed in transit, and DMARC checks that one of the two matches your From address and tells receivers what to do when neither does. Together they prove who sent a message, but not that it is wanted, so spam complaints and list quality still matter.
How do I set up SPF, DKIM and DMARC in the right order?
Set up SPF first with one TXT record that lists every service sending as your domain, then publish the DKIM public key your sending service gives you at selector._domainkey.yourdomain. Finally add a DMARC TXT record at _dmarc.yourdomain that starts with p=none and an rua reporting address, and tighten it only after reading your reports. Google's Workspace help says to wait 48 hours after SPF and DKIM before adding DMARC.
What DMARC policy should I start with?
Start with p=none, which monitors without affecting delivery, and read the aggregate reports sent to your rua address. Google's rollout guide suggests about a week there before quarantine. RFC 9989 (2026) says a domain that wants to move to reject should first run p=none for at least a month, then p=quarantine for an equally long period, and that domains whose users post to mailing lists should not publish reject at all.
Do I need SPF, DKIM and DMARC for Gmail and Yahoo?
Everyone sending to Gmail or Yahoo needs SPF or DKIM. Bulk senders need SPF, DKIM and a DMARC record (p=none is enough) with the From domain aligned to SPF or DKIM. Google puts the bulk threshold at about 5,000 messages a day to personal Gmail accounts, Yahoo publishes no number, and Microsoft requires SPF, DKIM and a DMARC record from high-volume Outlook.com senders.
How do I check that SPF, DKIM and DMARC are passing?
Send a test message to a Gmail address, open it, choose More and then Show original, and look for spf=pass, dkim=pass and dmarc=pass in the Authentication-Results header. Check that the domains shown match your From domain, because a pass for another domain does not satisfy DMARC. You can also query each record with dig and read your DMARC aggregate reports.
Why is my SPF failing?
The usual causes are two SPF records on one domain, more than 10 DNS lookups once nested includes are counted, a sending service missing from the record, and forwarding, which changes the sending IP. The first two produce a permerror under RFC 7208 (2014), so merge everything into one record and trim unused includes. If SPF passes for a vendor domain but DMARC still fails, the problem is alignment rather than the record.
How long do DNS changes take?
A new or changed record usually shows up within a few hours but can take up to 48 hours, according to GoDaddy's help center, and Google's Workspace help gives the same 48-hour ceiling for SPF and DKIM to start working. Caching decides the wait: resolvers keep an answer until its TTL expires and also cache not-found answers for a short time set by your zone's SOA record. Lowering the TTL a day before a planned change shortens the wait.
Enjoyed this article?
Get product updates, tips, and company news — no spam.
Subscribe to the newsletter