Every SPF, DKIM and DMARC error is fixed in your domain's DNS, usually by adding or editing one TXT record. You make the change where your domain's DNS is managed, wait for it to update, and check again. Nothing changes on your mail server unless the fix is DKIM signing, which your mail provider switches on for you.
If you want the background on what the three records do, read SPF, DKIM and DMARC in plain English first. This guide is for when a check failed and you want it green.
Before you change anything
Find out who sends email as your domain. That list decides every record below. Typical senders are your mailbox provider, a newsletter tool, your website's contact form, a help desk and a billing system. Each one's setup page lists the SPF include and DKIM record it needs.
Then open the DNS settings for the domain. Changes to TXT records usually show up within minutes to a few hours, depending on the record's TTL.
How to fix each email check
Most failures are one of eight problems. The table shows them together, and each has its own fix below.
| Problem | What it means | Fix |
|---|---|---|
| No SPF record | Anyone can claim to send for you | Add one TXT record |
| SPF is missing its all rule | Unlisted servers aren't rejected | End with -all or ~all |
| SPF uses more than 10 DNS lookups | SPF fails for everyone | Remove or flatten includes |
| No DMARC record | Failures have no policy | Add _dmarc TXT record |
| DMARC policy is none | Fake mail still delivered | Move to quarantine, then reject |
| DMARC settings need tuning | Partial coverage or no reports | Add rua, pct=100, sp |
| No DKIM key found | Mail isn't signed | Turn on signing at your provider |
| No MX record | Domain can't receive mail | Add MX, or lock down a non-mail domain |
1. No SPF record
Add one TXT record at the root of your domain (the host is often written @). List each sending service with the include its documentation gives you:
v=spf1 include:_spf.google.com include:spf.your-newsletter-tool.example -all
Here _spf.google.com is Google Workspace's include; replace the second one with what your own tool's setup page lists.
A domain must have exactly one SPF record. If you find two, merge them into one; two records make SPF fail even when both are correct.
2. SPF is missing its all rule
The rule at the end tells receivers what to do with servers not on your list. Without it, or with +all or ?all, SPF approves or ignores everyone.
-all: everything else fails. Use this once your list is complete.~all: everything else is marked suspicious. A softer setting while you confirm the list.
Never use +all. It authorizes the whole internet to send as you.
3. SPF uses more than 10 DNS lookups
The SPF standard, RFC 7208, lets a receiver do at most 10 DNS lookups while checking your record. Every include, a, mx, ptr, exists and redirect counts, including the ones inside each include. Past 10, SPF returns a permanent error, and DMARC treats that as a fail.
Fix it in this order:
- Remove services you no longer use. Old newsletter tools and former help desks are the usual leftovers.
- Drop
a,mxandptrunless your own servers really send mail. They cost lookups and are often there by habit. - Move a sender to a subdomain. Bulk mail from
news.example.comgets its own SPF record and its own 10 lookups. - Flatten as a last resort. Replace an include with the IP ranges it lists (
ip4:andip6:don't count as lookups). Providers change their IPs without notice, so a flattened record needs regular review or it silently breaks.
4. No DMARC record
DMARC lives at a fixed name: _dmarc. in front of your domain. Start in monitoring mode so nothing gets blocked while you learn who sends as you:
_dmarc.example.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
The rua address receives daily reports from large mailbox providers. Use a mailbox you actually read, or a separate address you set aside for reports.
5. DMARC policy is none
p=none only reports. Fake mail using your domain still reaches inboxes. Once the reports show that all your real senders pass SPF or DKIM with your domain, tighten the policy in two steps:
v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com
v=DMARC1; p=reject; rua=mailto:dmarc@example.com
Give each step a few weeks and keep reading the reports. A real sender that fails will show up there before customers complain.
6. DMARC settings need tuning
Three settings weaken an otherwise good record:
- No
ruatag. You get no reports, so you can't see spoofing or broken senders. Addrua=mailto:with your address. pctbelow 100. Only that share of failing mail gets the policy. Use it while moving up, then remove it or setpct=100.sp=none. Subdomains are left unprotected, so attackers send frombilling.example.cominstead. Removespto inherit the main policy, or set it to match.
7. No DKIM key found
DKIM keys are published under a name called a selector, such as google._domainkey.example.com. You don't create the key yourself: turn on DKIM signing in your mail provider's admin settings, and it gives you the TXT or CNAME record to add.
If you already did that and a check still finds nothing, the provider may use a custom selector. Open an email you sent, view the original message, and find the DKIM-Signature header. The s= value is your selector and d= is the signing domain. If d= is your provider's domain rather than yours, signing is on but not aligned with your domain yet.
8. No MX record
No MX record means the domain can't receive mail. That's fine for a domain that never uses email, but such domains are favorite spoofing targets. Lock them down with two records:
example.com TXT "v=spf1 -all"
_dmarc.example.com TXT "v=DMARC1; p=reject"
If the domain should receive mail, add the MX records your mailbox provider lists.
Why these errors matter more now
Gmail's email sender guidelines require every sender to set up SPF or DKIM, and anyone sending in bulk to set up SPF, DKIM and DMARC. Other large mailbox providers have followed. A domain that fails these checks sees more mail land in spam, and a domain without DMARC enforcement is easy to impersonate in phishing.
Frequently asked questions
How long do DNS changes take to work?
Most changes show up within minutes to a few hours, controlled by the record's TTL value. Some resolvers cache older answers until the TTL runs out. If a check still shows the old record after a day, confirm you edited the DNS zone your domain actually uses, not an old one at a previous host.
Should I use -all or ~all?
Use ~all while you are still finding all your senders, then switch to -all. With a DMARC policy of quarantine or reject, the difference matters less, because DMARC decides the outcome. Either way, end the record with one of the two, never with +all.
Can a wrong DMARC record stop my real email?
Yes, if you move to p=reject while a real sender still fails both SPF and DKIM alignment. Its mail will be refused. That's why you start with p=none and read the reports first. Reports list every source sending as your domain and whether it passed.
Do I need DKIM if SPF already passes?
Yes. SPF breaks when mail is forwarded, because the forwarding server isn't on your list. A DKIM signature survives forwarding, so DMARC can still pass. Large mailbox providers also expect both for bulk senders.
Check your domain again
After each change, run the domain through the email security checker. It counts SPF lookups, reads your DMARC tags, looks for DKIM at common selectors and links any failed check back to its fix in this guide.