On this page
The short version
- SPF lists who may send mail for your domain, DKIM signs each message, and DMARC checks that one of them matches the From address and says what to do when it doesn't.
- All three are TXT records in your DNS. Every service that sends in your name needs its place in them.
- Since February 2024, Gmail and Yahoo require SPF or DKIM from every sender, and all three from bulk senders. Gmail has enforced this more strictly since November 2025.
- Start DMARC with
p=noneand reports, fix every sender the reports show, then move to quarantine.
What SPF, DKIM and DMARC do, in plain words
Anyone can type any address in the From line, so every server that receives your mail checks the public DNS records of your domain. If they are missing or wrong, your mail is more likely to land in spam or be refused, and fake mail in your name gets through more easily.
SPF: who may send for your domain
SPF is one TXT record that starts with v=spf1 and lists every server allowed to send for your domain: your mailbox provider, newsletter tool, online shop, invoicing software. Most services give you an include to add, such as include:_spf.google.com for Google Workspace.
The ending covers everyone else. ~all marks other servers as probably not allowed, -all as not allowed. Google recommends ~all. Never use +all, which lets any server pass.
Two rules break SPF more often than anything else. A domain can have only one SPF record, and checking it may take at most 10 DNS lookups, counting every include, a, mx, ptr, exists and redirect, nested ones too. Break either rule and SPF returns an error for every message (RFC 7208).
DKIM: a signature on every message
DKIM signs each message with a private key kept by the service that sends it. The public key sits in your DNS under a selector, for example google._domainkey.example.com, so the receiver can check that the message comes from your domain and was not changed on the way.
Each service that sends for you has its own key and selector, so you turn DKIM on in each one: Google Workspace or Microsoft 365, your newsletter tool, your shop. Google suggests a 2048 bit key if your DNS provider supports it (Set up DKIM). Gmail requires at least 1024 bits.
DMARC: what happens to mail that fails
DMARC ties SPF and DKIM to the address people see. A message passes when SPF or DKIM passes for a domain that matches the From domain. By default the same main domain is enough, so news.example.com matches example.com.
The record sits at _dmarc on your domain and sets the policy for mail that fails: p=none only watches, p=quarantine sends it to spam, p=reject refuses it. The rua tag gives an address for daily reports on every server that sends in your name, and without it you get no reports at all. The current standard is RFC 9989 from May 2026, which replaced RFC 7489.
How to add SPF, DKIM and DMARC to your DNS
Add the records where your domain's DNS is managed: often your hosting company, sometimes the registrar where you bought the domain, or a separate DNS service. The nameservers of your domain show which one.
- List every sender. Everything that sends mail with your domain in From: mailbox, newsletter tool, shop, CRM, invoicing or booking software. The service you forget is the one that fails later.
- SPF. One TXT record on the domain itself (host
@), with an include for each service. If an SPF record exists, add to it instead of creating a second one. - DKIM. Turn it on in each service and add the record it gives you, usually TXT, sometimes CNAME. In Google Workspace, add the record first and only then click Start authentication.
- DMARC. A TXT record on the host
_dmarcwithp=noneand aruaaddress. Google advises waiting 48 hours after SPF and DKIM before you add it (Set up DMARC). - Check. SPF and DKIM can take up to 48 hours to start working. Then run our email deliverability check.
Here is an example for a domain that sends from Google Workspace. example.com stands for your domain, and your own services give you their values.
| Record | Host | Value (example) |
|---|---|---|
| RecordSPF | Host@ | Value (example)v=spf1 include:_spf.google.com ~all |
| RecordDKIM | Hostgoogle._domainkey | Value (example)v=DKIM1; k=rsa; p=MIIBIjANBgkq… and the rest of the key from your mail provider |
| RecordDMARC | Host_dmarc | Value (example)v=DMARC1; p=none; rua=mailto:dmarc@example.com |
All three are TXT records. A newsletter tool's include goes into the same SPF line, before ~all. DMARC reports arrive as XML files, sometimes many a day, so send them to a separate address or a report service, not your own inbox.
Gmail and Yahoo rules for email senders since 2024
Since February 2024, Gmail and Yahoo have had rules for everyone who sends to their users, and stricter ones for bulk senders. Gmail counts you as a bulk sender once you send close to 5,000 messages or more to personal Gmail accounts within 24 hours, counting all mail from the same main domain, and the status stays for good. Yahoo publishes no number.
All senders, for both Gmail and Yahoo:
- SPF or DKIM on your domain;
- valid forward and reverse DNS (PTR) for the servers that send your mail;
- a spam complaint rate below 0.3%;
- messages formatted by the email standard (RFC 5322). Gmail also requires a TLS connection.
Bulk senders, on top of that:
- both SPF and DKIM;
- a DMARC record with at least
p=none, and Yahoo adds that DMARC must pass; - the domain in From aligned with the SPF or DKIM domain;
- for marketing mail, one click unsubscribe in the message headers and a visible unsubscribe link in the email;
- unsubscribes handled fast: Gmail recommends within 48 hours, Yahoo asks for 2 days.
Gmail also says to keep the spam rate in Postmaster Tools below 0.1% and never reach 0.3%. Since November 2025 it has been enforcing the rules more strictly, with temporary and permanent rejections, and it says DMARC alignment with both SPF and DKIM will likely become a requirement too. See the Gmail sender guidelines, the Gmail FAQ and Yahoo Sender Best Practices.
DMARC from p=none to quarantine, step by step
p=none protects nothing on its own, but it shows you who sends mail in your name. Go stricter only when the reports are clean.
- Start with
p=noneandrua. Google suggests at least a week, usually enough for the daily reports to cover all your mail. If your newsletter goes out once a month, wait until it shows up. - Read the reports. Find servers that send in your name and fail both SPF and DKIM. Your own services go into SPF and get DKIM. Servers you don't recognise may be exactly the fake mail DMARC is there to stop.
- Move to
p=quarantine. Failing mail now goes to spam. Google's rollout guide suggests starting quarantine on part of the mail with thepcttag, for example 10% for a small company. RFC 9989 droppedpct, which in practice was usually not applied accurately, and addedt=yfor a test period. - Keep reading. A new shop, CRM or any other tool that sends for you goes into SPF and DKIM before its first message.
p=reject makes receivers refuse failing mail. It protects the most, but RFC 9989 warns that it can cause trouble for mailing lists and forwarding, and says domains that publish it must not rely on SPF alone and must sign with DKIM. We decide on reject for each domain separately, after months of clean reports.
How to check SPF, DKIM and DMARC
- Our free check. The email deliverability check reads your records, counts SPF lookups and suggests a DMARC record.
- A test message. Send an email from each service to a Gmail address, open it and click More, then Show original. The header holds the SPF, DKIM and DMARC results, and you want a pass. Google's Messageheader tool makes it easier to read.
- DMARC reports. They show what receivers saw for all your mail, not just one test.
- Postmaster Tools. If you send a lot to Gmail, Postmaster Tools shows your spam rate and whether you meet the sender rules. It covers only personal Gmail accounts, and with low volume the data may be missing.
Common mistakes
- Two SPF records. A new service added as a second record makes SPF fail for every message. Merge them into one.
- A forgotten sender. The shop or invoicing software sends from your domain without SPF or DKIM. Nobody notices under
p=none, and under quarantine its mail goes to spam. - Too many includes. Old services nobody uses push SPF over 10 lookups. Remove what you no longer use.
- DMARC without
rua. No reports, so you don't know what would break when you go stricter. - DKIM added but not started. In Google Workspace the record is in DNS, but nobody clicked Start authentication, so DKIM for your domain is still off.
Questions
Do I need SPF, DKIM and DMARC if I send only a few emails a day?
Yes. Gmail asks every sender for SPF or DKIM, whatever the volume, and DMARC protects your domain from fake mail in your name, such as fake invoices sent to your clients.
Should SPF end with ~all or -all?
Google recommends ~all. It says that servers outside your list are probably not allowed, while -all says they are not allowed. What finally happens to that mail is decided by your DMARC policy.
Can DMARC block my own email?
Yes, under quarantine or reject, if a service that sends for you is missing from SPF and doesn't sign with DKIM. That is why you start with p=none and read the reports first.
Is DMARC p=none enough?
It is the minimum for the Gmail and Yahoo bulk sender rules, but it doesn't protect your domain: with p=none, receivers take no action on mail that fails.
How long until new DNS records work?
Google says SPF and DKIM can take up to 48 hours to start working. Wait that long and check again before you change anything else.
Sources
Standards: RFC 7208 (SPF), RFC 6376 (DKIM), RFC 9989 (DMARC, May 2026), RFC 9990 (DMARC reports).
Google Workspace: Set up SPF, Set up DKIM, Set up DMARC, Recommended DMARC rollout, Troubleshoot DMARC issues.
Gmail: Email sender guidelines, Email sender guidelines FAQ, Show original, Set up Postmaster Tools, Postmaster Tools dashboards.
Yahoo: Sender Best Practices.
Checked in November 2026.
This guide explains general rules. Mail providers change their requirements from time to time, so check the linked sources before you change your DNS.