---
title: "SPF Guide: Records, Lookups, Flattening, Errors & Tools | AutoSPF"
description: "The complete SPF guide — fundamentals, step-by-step setup, the 10-lookup limit and flattening, troubleshooting, and advanced topics, with free tools to check, generate, and validate your records."
image: "https://autospf.com/images/og-default.png"
canonical: "https://autospf.com/spf-guide/"
---

Complete SPF Guide

# SPF: Everything You Need To Know

Guides, tools, and resources to master Sender Policy Framework — organized from first principles to staying under the 10-lookup limit for good.

[Start Free Trial](https://subscriptions.zoho.com/subscribe/31162770c20bc42aba9c86185ed6106a6a2bba0f6b053217ad482bf477cf719e/smb%5F1) [Check Your SPF Record](/tools/spf-checker/) 

30 hand-picked guides, tools & resources

01 

## SPF Fundamentals

Start here if you're new to SPF. Learn what Sender Policy Framework does, how a record is structured, and the mechanisms that decide which servers may send mail for your domain — the groundwork everything else builds on.

[ What is SPF? Understand Sender Policy Framework — how it authorizes sending servers and forms the first pillar of email authentication. 7 min read Read article → ](/blog/what-is-spf-email-a-guide-to-sender-validation-technology/)[ SPF Record Format The anatomy of an SPF TXT record: version, mechanisms, qualifiers, and the all mechanism that closes every record. 8 min read Read article → ](/spf-record-format/)[ SPF Mechanisms Explained What a, mx, ip4, ip6, and include actually do — and how each one contributes to (and counts against) your record. 7 min read Read article → ](/blog/understanding-spf-mechanisms-a-mx-ip4-and-include/)[ Understanding SPF Syntax A close read of SPF syntax so you can write, edit, and debug records with confidence instead of copy-paste guesswork. 9 min read Read article → ](/blog/spf-syntax-understanding-spf-records-for-email-configuration/)[ SPF Glossary Every SPF term in one place — mechanisms, qualifiers, PermError/TempError, and the jargon that shows up in reports. Guide Open glossary → ](/spf-glossary/) 

02 

## Create & Configure

Ready to publish? These step-by-step guides walk through building a valid SPF record and adding it at the providers most teams use — Microsoft 365, Google Workspace, and Cloudflare — without breaking existing mail flow.

[ How to Create an SPF Record A practical walkthrough to build your first SPF record and publish it as a DNS TXT entry the right way. 8 min read Start setup → ](/how-to-create-an-spf-record/)[ SPF Record Examples Real, annotated SPF records you can learn from and adapt — from a single sender to a multi-provider setup. 7 min read Read article → ](/spf-record-example/)[ Office 365 SPF Setup Publish an SPF record for Microsoft 365 that authorizes Exchange Online without knocking out your other senders. 9 min read Read article → ](/blog/create-office-365-spf-record-without-breaking-other-email-services/)[ Google Workspace SPF Setup The correct include for Google Workspace and how to combine it with other sources in a single valid record. 7 min read Read article → ](/blog/gmail-spf-record-setup-a-practical-guide-for-google-workspace/)[ Add an SPF Record in Cloudflare Click-by-click guide to publishing your SPF TXT record in Cloudflare DNS and verifying it resolves correctly. 8 min read Read article → ](/blog/autospf-definitive-guide-adding-spf-record-cloudflare/) 

03 

## The 10-Lookup Limit & Flattening

The most common way SPF silently breaks: too many DNS lookups. RFC 7208 caps evaluation at 10 lookups, and busy records blow past it. Learn why it happens, what flattening really does, and how a dedicated service keeps you under the limit for good.

[ SPF Too Many DNS Lookups Why the 10-lookup limit triggers a PermError, how to diagnose it, and the ways to bring your record back under budget. 9 min read Read article → ](/spf-too-many-dns-lookups/)[ SPF Checker Check any domain live — see the full include tree, count your DNS lookups, and spot exactly what pushes you over 10. Tool Open tool → ](/tools/spf-checker/)[ What is SPF Flattening? How flattening resolves nested includes into IP addresses to collapse your lookup count — and the trade-offs to know. 6 min read Read article → ](/blog/what-is-spf-flattening-and-why-is-it-important/)[ SPF Flattening Myths Separating fact from fiction on flattening — what it does, what it does not, and when it is the right call. 7 min read Read article → ](/spf-flattening-myths/)[ Combine SPF Records Correctly You can only have one SPF record per domain — here is how to merge multiple senders into it without errors. 8 min read Read article → ](/blog/combine-spf-records-correctly-to-avoid-too-many-dns-lookups-errors/)[ Why a Dedicated SPF Service Why automated, hosted SPF flattening beats manual fixes — records that stay valid as your senders change. 6 min read Read article → ](/why-dedicated-spf/) 

04 

## Errors & Troubleshooting

SPF is set up but mail still fails? These guides help you read the error, find the sending source, and fix the record — the fixes teams reach for most after go-live, plus a validator to confirm you're clean.

[ Fix SPF PermError & TempError What each error means and a DIY path to resolve them — from lookup limits to malformed syntax and DNS timeouts. 8 min read Read article → ](/fix-spf-permerror-and-temperror-a-diy-guide/)[ SPF Validation Failed Why an SPF check fails, what receivers do about it, and a step-by-step method to track down the root cause. 9 min read Read article → ](/spf-validation-failed-meaning-and-troubleshooting-methods/)[ SPF Validator Validate your record syntax and mechanisms instantly, and confirm it evaluates cleanly before you rely on it. Tool Open tool → ](/tools/spf-validator/)[ Advanced SPF Record Testing Go beyond a pass/fail check — testing techniques that catch PermError risks before receivers do. 10 min read Read article → ](/blog/advanced-spf-record-testing-protect-your-domain-from-permerror-issues/)[ Eliminate PermError & Lookup Issues Validation tips that target the two failure modes that break enterprise records: lookup overflow and bad syntax. 9 min read Read article → ](/blog/advanced-spf-validation-tips-to-eliminate-permerror-and-lookup-issues/) 

05 

## Advanced SPF

Take your setup further. Explore SPF macros, the macros-versus-flattening trade-off, the case for regular record checks, and where SPF is headed — the topics that round out a genuinely hardened configuration.

[ SPF Macros vs Flattening Two very different techniques compared — when macros make sense, when flattening wins, and why they are not interchangeable. 8 min read Read article → ](/spf-macros-vs-flattening/)[ SPF Macros Explained What SPF macros are, the syntax that drives them, and the narrow set of cases where they earn their complexity. 9 min read Read article → ](/explaining-sender-policy-framework-spf-macros/)[ The Complete SPF Record Guide A single deep-dive across syntax, lookups, flattening, and testing — the long-form reference to keep bookmarked. 14 min read Read article → ](/blog/complete-spf-record-guide-syntax-lookup-flattening-and-testing/)[ 10 Reasons to Check SPF Regularly Records drift as senders change. Here is why routine SPF checks belong in your security hygiene, not just setup. 7 min read Read article → ](/10-reasons-for-regular-spf-record-checks-in-cybersecurity/)[ The Future of SPF Where email authentication is heading and how SPF fits alongside DKIM, DMARC, and the standards coming next. 6 min read Read article → ](/future-of-spf/) 

06 

## Free SPF Tools

No account, no sign-up — check, generate, validate, and look up SPF records in seconds. Every tool links to the canonical version so you always land on the same trusted page.

[ SPF Checker Check a domain live, expand the full include tree, and count DNS lookups against the 10-lookup limit. Tool Open tool → ](/tools/spf-checker/)[ SPF Record Generator Build a valid SPF record for your senders in seconds — correct syntax, no guesswork. Tool Open tool → ](/tools/spf-record-generator/)[ SPF Validator Validate record syntax and mechanisms and confirm the record evaluates cleanly. Tool Open tool → ](/tools/spf-validator/)[ SPF Record Lookup Look up the published SPF record for any domain and read it back in plain terms. Tool Open tool → ](/tools/spf-record-lookup/) 

## Stop fighting the 10-lookup limit.

AutoSPF flattens your record automatically and keeps it valid as your senders change — so SPF just works, permanently. Set it once and forget PermErrors.

[Start Free Trial](https://subscriptions.zoho.com/subscribe/31162770c20bc42aba9c86185ed6106a6a2bba0f6b053217ad482bf477cf719e/smb%5F1) [View Pricing](/pricing/) 

Rated 5/5 on G2 · Trusted since 2018 

##  Trusted by 50,000+ domains 

### "AutoSPF Flattens SPF Records Seamlessly & Keeps Changes Logged - I am quite pleased with the product"

> It does what it promises to do, and does it very well. I appreciate that it keeps a log of changes made, which prevents many mistakes. A client's SPF record would have way too many lookups, but AutoSPF makes that problem go away. The length of the SPF record is typically not the issue; it's the amount of lookups in the record that are. AutoSPF "flattens" the record, automatically expanding the defined lookups to IP addresses or ranges. And it auto-updates the record when the un-flattened lookups change. 

 PJ 

Peter J.

 President · Small-Business (50 or fewer emp.) 

### "Helped us go beyond capacity"

> AutoSPF did exactly as described, it helped us get past our 10 lookup limit. Afterwards, we hit another limit regarding overall capacity and when contacted, they quickly provided us with a new solution to eliminate capacity issues entirely going forward, so now we can add as many SPF records as needed. They also provided us with a personalized support video explaining their new method in its entirety using our instance as the example. 

 VU 

Verified User

 Financial Services · Mid-Market (51-1000 emp.) 

### "Great service and great support"

> AutoSPF was easy to initially set up on our own and a great cost effective entry into spf flattening. Needed our first support assistance today and got great response including a video demonstrating the issue I was trying to solve, a quick fix, and more detailed followup. 

 GF 

Greg F.

 Mid-Market (51-1000 emp.) 

[Read our reviews on G2 ](https://www.g2.com/products/autospf/reviews)

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138897474","name":"AutoSPF","url":"https://autospf.com","logo":{"@type":"ImageObject","url":"https://autospf.com/images/autospf-logo.png"},"description":"Automatic SPF flattening and email authentication management. Resolve SPF lookup limits, flatten SPF records, and maintain email deliverability across all your domains.","parentOrganization":{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138883901","name":"DuoCircle LLC","url":"https://www.duocircle.com","sameAs":["https://www.wikidata.org/wiki/Q138883901","https://www.crunchbase.com/organization/duocircle-llc","https://www.linkedin.com/company/duocircle","https://github.com/duocircle"],"subOrganization":[{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138898167","name":"DMARC Report","url":"https://dmarcreport.com"},{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138897474","name":"AutoSPF","url":"https://autospf.com"},{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138897912","name":"Phish Protection","url":"https://www.phishprotection.com"}]},"sameAs":["https://www.wikidata.org/wiki/Q138897474","https://www.linkedin.com/company/autospf","https://x.com/autospf01","https://www.facebook.com/autospf","https://github.com/duocircle","https://www.g2.com/products/autospf/reviews"],"aggregateRating":{"@type":"AggregateRating","ratingValue":"5.0","reviewCount":"21","bestRating":"5","worstRating":"1","url":"https://www.g2.com/products/autospf/reviews"},"contactPoint":{"@type":"ContactPoint","contactType":"customer support","url":"https://autospf.com/contact-us/"},"knowsAbout":["SPF Record Flattening","Sender Policy Framework","Email Authentication","DNS Management","DMARC","DKIM","Email Deliverability","SPF Lookup Limits"]}
```

```json
{"@context":"https://schema.org","@type":"WebSite","name":"AutoSPF","url":"https://autospf.com","description":"Automatic SPF flattening and email authentication management. Resolve SPF lookup limits, flatten SPF records, and maintain email deliverability across all your domains.","publisher":{"@type":"Organization","name":"AutoSPF","url":"https://autospf.com","logo":{"@type":"ImageObject","url":"https://autospf.com/images/autospf-logo.png"},"description":"Automatic SPF flattening and email authentication management. Resolve SPF lookup limits, flatten SPF records, and maintain email deliverability across all your domains.","parentOrganization":{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138883901","name":"DuoCircle LLC","url":"https://www.duocircle.com","sameAs":["https://www.wikidata.org/wiki/Q138883901","https://www.crunchbase.com/organization/duocircle-llc","https://www.linkedin.com/company/duocircle","https://github.com/duocircle"],"subOrganization":[{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138898167","name":"DMARC Report","url":"https://dmarcreport.com"},{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138897474","name":"AutoSPF","url":"https://autospf.com"},{"@type":"Organization","@id":"https://www.wikidata.org/wiki/Q138897912","name":"Phish Protection","url":"https://www.phishprotection.com"}]}}}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is SPF and how does it work?","acceptedAnswer":{"@type":"Answer","text":"SPF (Sender Policy Framework) is a DNS TXT record that lists which mail servers are allowed to send email for your domain. Receiving servers check the record and use the result — pass, fail, or softfail — to decide how much to trust the message. SPF is one of the three core email-authentication standards alongside DKIM and DMARC."}},{"@type":"Question","name":"Where should I start with SPF?","acceptedAnswer":{"@type":"Answer","text":"Start with the SPF Fundamentals section to understand what a record contains and how its mechanisms work, then move to Create & Configure to publish a valid record for your senders. If you already have a record, the 10-Lookup Limit and Errors sections cover the two most common ways SPF breaks."}},{"@type":"Question","name":"What is the SPF 10-lookup limit?","acceptedAnswer":{"@type":"Answer","text":"RFC 7208 caps SPF evaluation at 10 DNS mechanism lookups. Every include, a, mx, and redirect counts. Exceed 10 and the check returns a PermError, which can fail authentication for all mail from your domain. SPF flattening — replacing nested includes with their resolved IP addresses — is the standard way to stay under the limit."}},{"@type":"Question","name":"How do I fix an SPF PermError?","acceptedAnswer":{"@type":"Answer","text":"A PermError usually means too many DNS lookups or invalid syntax. Use the SPF Checker to count your lookups and see the full include tree, remove or consolidate unnecessary includes, and flatten the record if you still exceed 10. The Errors & Troubleshooting section walks through each case."}},{"@type":"Question","name":"Do you have free SPF tools?","acceptedAnswer":{"@type":"Answer","text":"Yes. AutoSPF offers free tools to check an SPF record, generate a new one, validate syntax, and look up the published record for any domain — all without an account."}}]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://autospf.com/"},{"@type":"ListItem","position":2,"name":"SPF Guide","item":"https://autospf.com/spf-guide/"}]}
```

```json
{"@context":"https://schema.org","@type":"Product","name":"AutoSPF","url":"https://autospf.com","aggregateRating":{"@type":"AggregateRating","ratingValue":5,"reviewCount":21,"bestRating":5,"worstRating":1},"review":[{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":5,"bestRating":5},"author":{"@type":"Person","name":"Peter J.","jobTitle":"President"},"datePublished":"2026-03-10","reviewBody":"It does what it promises to do, and does it very well. I appreciate that it keeps a log of changes made, which prevents many mistakes. A client's SPF record would have way too many lookups, but AutoSPF makes that problem go away. The length of the SPF record is typically not the issue; it's the amount of lookups in the record that are. AutoSPF \"flattens\" the record, automatically expanding the defined lookups to IP addresses or ranges. And it auto-updates the record when the un-flattened lookups change.","name":"AutoSPF Flattens SPF Records Seamlessly & Keeps Changes Logged - I am quite pleased with the product","publisher":{"@type":"Organization","name":"G2","url":"https://www.g2.com"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":5,"bestRating":5},"author":{"@type":"Person","name":"Verified User","jobTitle":"Financial Services"},"datePublished":"2025-07-31","reviewBody":"AutoSPF did exactly as described, it helped us get past our 10 lookup limit. Afterwards, we hit another limit regarding overall capacity and when contacted, they quickly provided us with a new solution to eliminate capacity issues entirely going forward, so now we can add as many SPF records as needed. They also provided us with a personalized support video explaining their new method in its entirety using our instance as the example.","name":"Helped us go beyond capacity","publisher":{"@type":"Organization","name":"G2","url":"https://www.g2.com"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":5,"bestRating":5},"author":{"@type":"Person","name":"Greg F."},"datePublished":"2023-07-26","reviewBody":"AutoSPF was easy to initially set up on our own and a great cost effective entry into spf flattening. Needed our first support assistance today and got great response including a video demonstrating the issue I was trying to solve, a quick fix, and more detailed followup.","name":"Great service and great support","publisher":{"@type":"Organization","name":"G2","url":"https://www.g2.com"}}]}
```
