# SPF, DKIM and DMARC: what they are and how to set them up

> What each record checks, what Gmail, Yahoo and Outlook require, and the full setup for a domain that sends from several services.


**SPF, DKIM and DMARC are three records you publish in your domain's DNS so mail servers can check that a message claiming to come from your brand really comes from it.** SPF lists which servers may send on behalf of the domain. DKIM signs each message with a key whose public part lives in DNS. DMARC says what to do when a message fails those checks for the same domain the recipient sees, and where to send reports.

## What each one checks

| Record | What it checks | Where it's published |
| --- | --- | --- |
| SPF | That the server delivering the message is authorized for the domain of the technical sender | A TXT record on the domain, starting with `v=spf1` |
| DKIM | That the message hasn't changed since it was signed, and who signed it | A TXT or CNAME record at `selector._domainkey.your-domain` |
| DMARC | That SPF or DKIM pass with a domain aligned with the visible sender, and what to do if they don't | A TXT record at `_dmarc.your-domain` |

The key word is **alignment**. SPF and DKIM can pass for your newsletter provider's domain and not for yours. DMARC requires at least one of them to pass with a domain that matches the one in the message's "From" field.

## What Gmail, Yahoo and Outlook require today

- **Gmail** has required since February 2024 that [all senders](https://support.google.com/mail/answer/81126) set up SPF or DKIM, have valid reverse DNS and keep the reported spam rate below 0.3%. Anyone sending close to 5,000 messages or more a day to Gmail accounts needs SPF, DKIM and a DMARC record (at least `p=none`), alignment, and one-click unsubscribe on marketing email. Gmail adds up sends from every subdomain of the same primary domain and, once you reach that volume, [it keeps treating you as a bulk sender](https://support.google.com/mail/answer/14229414) even if you send less later. Since November 2025, Gmail has [ramped up enforcement](https://support.google.com/mail/answer/14229414): non-compliant messages can face temporary or permanent rejections.
- **Yahoo** asks [all senders](https://senders.yahooinc.com/best-practices/) for SPF or DKIM, and bulk senders for SPF and DKIM, a passing DMARC policy of at least `p=none`, and one-click unsubscribe.
- **Outlook.com** (hotmail, live and outlook addresses) has required SPF, DKIM and aligned DMARC since May 2025 for domains sending more than 5,000 emails a day. Its [announcement](https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/strengthening-email-ecosystem-outlook%E2%80%99s-new-requirements-for-high%E2%80%90volume-senders/4399730) provides for routing non-compliant messages to junk or rejecting them.

If you send less, the requirements for all senders still apply to you, and DMARC protects your domain from anyone trying to spoof it.

## Example: a domain that sends from several services

Fictional case. A store uses `example.com`. The team writes from Google Workspace and the newsletter goes out through a bulk email service. The billing tool also sends invoices as `invoices@example.com`.

**1. SPF: a single record with every sender.**

```text
example.com.  TXT  "v=spf1 include:_spf.google.com include:spf.email-service.example ~all"
```

`include:_spf.google.com` is the value [Google gives](https://knowledge.workspace.google.com/admin/security/set-up-spf) for Workspace; the second `include` is a placeholder: use the one your provider gives you. Two common mistakes break SPF entirely. The first is publishing two `v=spf1` records: the domain [must have only one](https://www.rfc-editor.org/rfc/rfc7208.html#section-3.2). The second is going over [ten DNS lookups](https://www.rfc-editor.org/rfc/rfc7208.html#section-4.6.4): every `include`, `a`, `mx`, `ptr`, `exists` or `redirect` counts, including the ones nested inside each `include`, and once the limit is exceeded the result is a permanent error.

**2. DKIM: a signature with your domain in each service.**

In Workspace, you generate the key from the Admin console, publish the TXT record it shows and then, back in the console, select the domain and click **Start authentication**. Publishing the record isn't enough: Gmail starts signing after that step, according to [Google's instructions](https://knowledge.workspace.google.com/admin/security/set-up-dkim). In the newsletter service, you authenticate your own domain: the provider usually gives you CNAME records, for example `s1._domainkey.example.com`. That step is what aligns DKIM. Without it, the service signs with its own domain and DMARC doesn't count it as yours.

**3. DMARC: start by observing.**

```text
_dmarc.example.com.  TXT  "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"
```

With `p=none`, the domain doesn't ask receiving servers to quarantine or reject messages that fail DMARC; each server still applies its own filters. Those that generate aggregate reports send them to that address, with every source that used your domain and whether it passed SPF, DKIM and DMARC.

## Read the reports before tightening the policy

After a few weeks, the fictional store's reports summarize like this:

| Source | Result | Decision |
| --- | --- | --- |
| Google Workspace | SPF and DKIM pass, aligned | Ready to tighten |
| Newsletter service | SPF passes with the provider's domain; DKIM passes with `example.com` | DMARC passes thanks to DKIM; nothing else needed |
| Billing tool | SPF and DKIM fail | Set up its DKIM, or move invoices to a subdomain with its own authentication |
| Unknown server | Both fail | Possible spoofing: this is what the policy should stop |

The billing row decides the order. If the store moved to `p=reject` now, legitimate invoices would start bouncing. Fix that source first. Once the reports show that every legitimate source you identified authenticates and aligns, move to `p=quarantine` and then to `p=reject`, checking the reports after each change. Sources you didn't authorize can keep failing: they are exactly what the policy should stop.

Many guides still show the `pct` tag to apply the policy to a percentage of messages. The current standard, [RFC 9989](https://datatracker.ietf.org/doc/rfc9989/) from May 2026, replaced RFC 7489 and removed that tag. To step up the policy, rely on what the reports show.

## How to check that it works

Send a test email to a Gmail account other than the sending one and open **Show original**: you'll see the message's SPF, DKIM and DMARC results. Repeat the test from every service that sends with your domain, including the billing tool.

Authentication decides whether a message is recognized as yours; it doesn't guarantee the inbox. Bounces and complaints still count, and we explain them in [hard vs soft bounce](/en/guides/hard-vs-soft-bounce/). To read your campaign results afterwards, look at [open rate](/en/guides/email-open-rate/) and [click-to-open rate](/en/guides/click-to-open-rate/).

## Plan your next post in HeyMark.

Keep the idea, review the draft with your team, and see how it performed in the accounts you connected.

[Start free](https://app.heymark.ai) · [See how it works](https://heymark.ai/en/#product)

## Developer and agent resources

- [HeyMark MCP documentation](https://heymark.ai/en/mcp/)
- [llms.txt](https://heymark.ai/llms.txt)
- [Full site content for language models](https://heymark.ai/llms-full.txt)
- MCP protocol endpoint: `POST https://mcp.heymark.ai`
- OAuth protected-resource metadata: [/.well-known/oauth-protected-resource](https://mcp.heymark.ai/.well-known/oauth-protected-resource)
- MCP server card: [/server-card](https://mcp.heymark.ai/server-card)
