---
title: "SPF record"
description: "A DNS TXT record listing the servers allowed to send email for your domain. Receivers check it before they trust a message. How to check yours."
url: https://ursy.com/wiki/spf-record/
updated: 2026-11-26T15:48:12+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/spf-record/
---

# SPF record

> A DNS TXT record listing the servers allowed to send email for your domain. Receivers check it before they trust a message. How to check yours.

**An SPF record is a DNS TXT record that lists the servers allowed to send email for your domain.** Receiving mail servers check it to see whether a message came from an authorised server. If your quotes and invoices go out through a booking system or a newsletter service, that service must be in your SPF record too, or its mail can fail the check.

## What is an SPF record? {#what-is-an-spf-record}

SPF stands for Sender Policy Framework. The standard is [RFC 7208](https://www.rfc-editor.org/rfc/rfc7208), published in April 2014. The record lives in your [DNS](https://ursy.com/wiki/dns/) as a TXT record on your [domain](https://ursy.com/wiki/domain-name/), and it starts with `v=spf1`. RFC 7208 says SPF records must be published as TXT records; an older special record type is no longer to be used. Each domain gets one SPF record, listing every service that sends mail as you.

## What does SPF actually check? {#what-does-spf-actually-check}

This surprises many people. SPF does not check the From address you see in your inbox. RFC 7208 checks two other names: the HELO name the sending server gives, and the MAIL FROM address, the hidden “envelope” sender where bounces go. The receiver takes the sending server’s [IP address](https://ursy.com/wiki/ip-address/) and asks: is this address on the list published by the MAIL FROM domain? Lining that up with the visible From address is the job of [DMARC](https://ursy.com/wiki/dmarc/).

## How does an SPF check work? {#how-does-an-spf-check-work}

1. A server connects and says which domain the mail is from (MAIL FROM).
2. The receiver fetches that domain’s TXT records and finds the one starting `v=spf1`.
3. It reads the terms left to right: `ip4:`, `ip6:`, `include:`, `a`, `mx` and so on.
4. The first term that matches the sending address decides the result. The `all` term at the end matches everything left.
5. The result is one of seven: none, neutral, pass, fail, softfail, temperror or permerror.

## What do Gmail, Yahoo and Outlook ask for? {#what-do-gmail-yahoo-and-outlook-ask-for}

- **Gmail:**  since 1 February 2024, [Google’s sender guidelines](https://support.google.com/a/answer/81126) ask every sender to set up SPF or DKIM. Senders of more than 5,000 messages a day to personal Gmail accounts must set up both, plus DMARC. [Google](https://ursy.com/wiki/google/) also asks for valid forward and reverse DNS on sending servers.
- **[Yahoo](https://ursy.com/wiki/yahoo/):**  its [sender best practices](https://senders.yahooinc.com/best-practices/) ask all senders for SPF or DKIM, and bulk senders for both.
- **Outlook:**  [Microsoft’s April 2025 post](https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/strengthening-email-ecosystem-outlook%E2%80%99s-new-requirements-for-high%E2%80%90volume-senders/4399730) says SPF “Must Pass” for domains sending over 5,000 emails a day to outlook.com, hotmail.com and live.com. From 5 May 2025 their non-compliant mail goes to Junk.

## Why does SPF matter for search? {#why-does-spf-matter-for-search}

SPF records are read by mail servers, not by [search crawlers](https://ursy.com/wiki/search-crawler/) such as [Googlebot](https://ursy.com/wiki/googlebot/). The link to search is the domain. The name that ranks your [landing pages](https://ursy.com/wiki/landing-page/) is the name spoofers would like to send as. Search visits also end in email: a booking reply, a quote, an order confirmation. If those land in spam, the work that brought the visitor from [organic search](https://ursy.com/wiki/organic-traffic/) is wasted, and your [conversion rate](https://ursy.com/wiki/conversion-rate/) looks worse than it is.

## Why does SPF matter for AI answers? {#why-does-spf-matter-for-ai-answers}

When an [AI assistant](https://ursy.com/wiki/ai-assistant/) recommends a business, the next step is often an email. When an [AI agent](https://ursy.com/wiki/ai-agent/) books or orders for someone, it often waits for an emailed confirmation or code. If your reply fails SPF and DMARC, it may never arrive. The person, and any assistant reading their inbox for them, then sees silence, not your answer.

## A worked example {#a-worked-example}

A bakery sends its email through Google Workspace. [Google’s SPF help](https://knowledge.workspace.google.com/admin/security/set-up-spf) gives its record as:

```
v=spf1 include:_spf.google.com ~all
```

Later the bakery starts a newsletter with Mailchimp. It does not add a second record. It adds Mailchimp to the same one, as Google’s own table shows:

```
v=spf1 include:_spf.google.com include:servers.mcsv.net ~all
```

| Part | What it means |
| --- | --- |
| `v=spf1` | This TXT record is an SPF record |
| `include:` | Also allow the servers listed in that service’s own SPF record |
| `ip4:` / `ip6:` | Allow one address or a range, written in CIDR form |
| `~all` | Any other server is a softfail: probably not allowed, so receivers may treat the mail as spam |
| `-all` | Any other server is a fail: not allowed |

RFC 7208 defines four qualifiers: `+` pass (the default), `-` fail, `~` softfail and `?` neutral. Google’s help recommends ending with `~all`.

## What about domains that never send email? {#what-about-domains-that-never-send-email}

They need SPF too. The UK National Cyber Security Centre warns that unprotected domains that send no email “can just as easily be used for email spoofing and phishing”. [Its advice for parked domains](https://www.ncsc.gov.uk/blog-post/protecting-parked-domains) starts with this record, which authorises no server at all:

```
v=spf1 -all
```

Do this for old brand names and spare domains too, and renew them: a domain you let lapse can be bought by someone else, which is how [expired domain abuse](https://ursy.com/wiki/expired-domain-abuse/) starts. The NCSC pairs the SPF record with a DMARC record set to `p=reject`, an empty DKIM key and a “null MX” record (`0 .`), defined in [RFC 7505](https://www.rfc-editor.org/rfc/rfc7505.html). See [MX record](https://ursy.com/wiki/mx-record/).

## Common mistakes {#common-mistakes}

- **Two SPF records on one domain.**  RFC 7208 says a domain must not have more than one, and a check that finds two returns “permerror”, so the record fails. Merge them.
- **Too many look-ups.**  RFC 7208 limits the terms that need DNS look-ups (`include`, `a`, `mx`, `ptr`, `exists` and `redirect`) to 10 in total, counting any inside the services you include. Over that, the result is “permerror”. Google’s help says a record can have up to 10 `include` tags.
- **Includes that lead nowhere.**  RFC 7208 says checks should allow no more than two “void” look-ups, ones that find nothing. Remove includes for services you have left.
- **Using `ptr`.**  RFC 7208 says the `ptr` term “SHOULD NOT be published”.
- **A forgotten sender.**  A booking system, shop platform or card terminal that emails receipts as you, but is missing from the record.
- **A test site sending as you.**  A [staging site](https://ursy.com/wiki/staging-site/) that sends order emails from a server not in the record fails SPF and fills your DMARC reports with noise.
- **Forgetting subdomains.**  Google’s help says each subdomain you send from needs its own SPF record.
- **Expecting SPF to survive forwarding.**  RFC 7208 says a forwarder that keeps the original sender address makes SPF fail. That is why [DKIM](https://ursy.com/wiki/dkim/) matters too.

## How to check it {#how-to-check-it}

1. Look up your domain’s TXT records with the [DNS Lookup](https://ursy.com/webmaster-tools/dns-lookup/) tool. The SPF record starts with `v=spf1`. There must be exactly one. Our [DNS records](https://ursy.com/wiki/dns-records/) entry explains the other record types you will see.
2. Paste the record into the [SPF Record Explainer](https://ursy.com/webmaster-tools/spf-record-explainer/). It reads the record in plain words, one part at a time.
3. Count the look-ups. Every `include`, `a`, `mx` and `redirect` counts, and so do the ones inside each include. Stay at 10 or under.
4. Check the `ip4:` ranges with the [IP Subnet Calculator](https://ursy.com/webmaster-tools/subnet-calculator/), which turns a CIDR range into its first and last address and host count.
5. Run the whole domain through the [Email Security Checker](https://ursy.com/webmaster-tools/email-security-checker/). It checks SPF, DKIM, DMARC, MX, MTA-STS and BIMI live from the DNS.
6. After a change, use the [DNS Propagation Checker](https://ursy.com/webmaster-tools/dns-propagation-checker/). Google says SPF can take up to 48 hours to start working.
7. Make a list of every service that sends as your domain. The [tech stack checker](https://ursy.com/tech-stack-checker/) shows which shop and other platforms your website runs on; any that send order emails belong in the record.
8. Google asks for valid forward and reverse DNS on sending servers. The [Website IP Lookup](https://ursy.com/webmaster-tools/website-ip-lookup/) shows an address’s network owner and reverse name, and our [reverse DNS bot check](https://ursy.com/wiki/reverse-dns-bot-check/) entry explains how forward and reverse names are matched, the same idea that separates [verified bots](https://ursy.com/wiki/verified-bots/) from fakes. [Verify an AI Bot](https://ursy.com/verify-ai-bot/) uses the same idea for crawlers.
9. Send yourself a test email in Gmail, choose “Show original”, as [Gmail Help](https://support.google.com/mail/answer/29436) describes, and paste the header into the [Email Header Analyser](https://ursy.com/webmaster-tools/email-header-analyser/). Look for `spf=pass`, a result name from [RFC 8601](https://www.rfc-editor.org/rfc/rfc8601.html).
10. Then add the other two records. Build a DMARC record with the [DMARC Record Generator](https://ursy.com/webmaster-tools/dmarc-record-generator/) and check your keys with the [DKIM Record Decoder](https://ursy.com/webmaster-tools/dkim-record-decoder/). [SPF, DKIM and DMARC explained](https://ursy.com/wiki/spf-dkim-dmarc-explained/) shows the safe order.
11. Check the website side of the same domain: the [SSL checker](https://ursy.com/ssl-checker/) for its [certificate](https://ursy.com/wiki/ssl-certificate/) and the [security headers checker](https://ursy.com/security-headers-checker/) for its headers. On WordPress, the [WordPress security checker](https://ursy.com/wordpress-security-checker/) shows exposed user lists and open APIs on the same domain.
12. Check where your emails send people. The [redirect checker](https://ursy.com/redirect-checker/) follows every [redirect](https://ursy.com/wiki/redirect/) hop of a tracked link, so you can spot a long [redirect chain](https://ursy.com/wiki/redirect-chain/), and the [broken link checker](https://ursy.com/broken-link-checker/) finds [broken links](https://ursy.com/wiki/broken-link/) on the page they land on.

Single checks on each tool page: free, no account (2 a day). The full audit: a free account (sign in with an emailed code), 1 a day.

## What URSY.com counts {#what-ursy-counts}

URSY.com counts visits to your website, not email. A click from an email shows as a [page view](https://ursy.com/wiki/pageview/) when the visitor’s browser runs our cookie-free counter. The counter never stores query strings, only the path, so [UTM tags](https://ursy.com/wiki/utm-parameters/) are not kept. Reverse DNS is used only in our Verify an AI [Bot](https://ursy.com/wiki/bot-web-robot/) tool, not in the log. See [methodology](https://ursy.com/methodology/).

## Questions {#questions}

### Should I end with ~all or -all? {#should-i-end-with-all-or-all}

Google’s help recommends `~all` for domains that send mail. The NCSC uses `-all` for domains that send none. Your DMARC policy then decides what receivers do with failures.

### Can I have two SPF records? {#can-i-have-two-spf-records}

No. RFC 7208 says one. Two give “permerror”. Put every service into one record.

### Why does my SPF pass but DMARC fail? {#why-does-my-spf-pass-but-dmarc-fail}

SPF checks the hidden MAIL FROM domain. If your newsletter service uses its own bounce domain, SPF passes for that domain, not yours, so it does not line up with your From address. Use DKIM signed with your domain.

### What does softfail mean? {#what-does-softfail-mean}

The sending server is probably not allowed. Receivers may accept the mail but treat it as suspicious.

### Does SPF work for forwarded mail? {#does-spf-work-for-forwarded-mail}

Often not. RFC 7208 says forwarding makes SPF fail unless the forwarder rewrites the sender address.

## Related words {#related-words}

- [DKIM](https://ursy.com/wiki/dkim/)
- [DMARC](https://ursy.com/wiki/dmarc/)
- [SPF, DKIM and DMARC explained: why your emails go to spam](https://ursy.com/wiki/spf-dkim-dmarc-explained/)
- [Email deliverability](https://ursy.com/wiki/email-deliverability/)
- [DNS records](https://ursy.com/wiki/dns-records/)
- [MX record](https://ursy.com/wiki/mx-record/)
- [DNS](https://ursy.com/wiki/dns/)
- [IP address](https://ursy.com/wiki/ip-address/)
- [Subdomain](https://ursy.com/wiki/subdomain/)

## Sources {#sources}

- [RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1 (April 2014), checked 24 November 2026](https://www.rfc-editor.org/rfc/rfc7208)
- [RFC 7505: A “Null MX” No Service Resource Record (June 2015), checked 24 November 2026](https://www.rfc-editor.org/rfc/rfc7505.html)
- [RFC 8601: Message Header Field for Indicating Message Authentication Status (May 2019), checked 24 November 2026](https://www.rfc-editor.org/rfc/rfc8601.html)
- [Google Workspace Admin Help: Set up SPF (last updated 10 November 2026), checked 24 November 2026](https://knowledge.workspace.google.com/admin/security/set-up-spf)
- [Google Workspace Admin Help: Email sender guidelines, checked 24 November 2026](https://support.google.com/a/answer/81126)
- [Gmail Help, viewing an email’s full headers, checked 24 November 2026](https://support.google.com/mail/answer/29436)
- [Yahoo, Sender best practices, checked 24 November 2026](https://senders.yahooinc.com/best-practices/)
- [Microsoft, Outlook’s new requirements for high-volume senders (April 2025), checked 24 November 2026](https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/strengthening-email-ecosystem-outlook%E2%80%99s-new-requirements-for-high%E2%80%90volume-senders/4399730)
- [NCSC, Protecting parked domains, checked 24 November 2026](https://www.ncsc.gov.uk/blog-post/protecting-parked-domains)

*Updated 24 November 2026 by URSY.com.*
