---
title: "What Is SPF Flattening, And How Does It Work? | DuoCircle"
description: "Join the thousands of organizations that use DuoCircle Find out how affordable it is for your organization today and be pleasantly surprised.Interested in"
image: "https://www.duocircle.com/images/og-default.png"
canonical: "https://www.duocircle.com/content/spf-too-many-dns-lookups/spf-flattening/"
---

Content 

#  What Is SPF Flattening, And How Does It Work? 

 Join the thousands of organizations that use DuoCircle Find out how affordable it is for your organization today and be pleasantly surprised.Interested in 

[ Talk to an Expert → ](/contact/) [ See what we make ](/products/) 

## What Is SPF Flattening, And How Does It Work?

[SPF too many DNS lookups](/content/spf-too-many-dns-lookups) error often leads to mail authentication failure and mails getting rejected. The [SPF lookup](/content/spf-too-many-dns-lookups/spf-lookup) mechanism allows up to **10 DNS lookups**, beyond which there would be an SPF lookup failure. _SPF flattening is one of the solutions that can avoid this error and ensure the emails’ deliverability_.

[Fix Your SPF Errors Now](/email/spf-record-check)

![spf too many dns lookups](https://media.mailhop.org/duocircle/images/2020/12/dns-spf-record.png) 

### Why Is SPF Flattening Relevant?

_[SPF flattening](https://www.autospf.com/) helps in avoiding the DNS lookup error significantly_. It minimizes the chance of the emails getting flagged as spam since it becomes easier for the receiver to **validate SPF**.

Flattening causes [SPF compression](/content/spf-too-many-dns-lookups/spf-compression) by doing away with various SPF mechanisms and finalizing it with a single **SPF record** containing all IP addresses related to multiple domains. Instead of using mechanisms that point to numerous domains that are to be included, they are represented directly by the IP addresses. Thus, it helps in avoiding errors like ‘[Permerror SPF permanent error too many DNS lookups](/content/spf-too-many-dns-lookups/permerror-spf-permanent-error-too-many-dns-lookups).’ _The error usually shows up if the number of DNS lookups goes beyond the permissible [SPF lookup limit](/content/spf-too-many-dns-lookups/spf-lookup-limit) of 10_.

### How Does SPF Flattening Work?

_The SPF flattening technique is useful when the DNS lookup limit is approached due to an increased number of SPF mechanisms_. Using the **SPF flattening** process, SPF mechanisms like ‘a,’ ‘mx,’ and ‘include’ are removed, which gives a simplified SPF record. It reduces the number of DNS lookups. Otherwise, the presence of each one of such mechanisms will unnecessarily add a lookup count.

Once the SPF record is flattened, the domains earlier pointed to by the mechanisms are represented solely by a string of ip4 and ip6 rules in a single SPF record. While the usual SPF record will need multiple [DNS queries](https://sendgrid.com/docs/ui/account-and-settings/spf-limitations/), the flattened one only needs one. SPF flattening’s prime motive is reducing the number of DNS queries, thus _preventing email authentication failure_.

[Multiple SPF records](/content/spf-too-many-dns-lookups/multiple-spf-records) and numerous DNS queries are among the common **SPF errors**. The [SPF lookup counter](/content/spf-too-many-dns-lookups/spf-lookup-counter) has a limit set for ten, and beyond that, there will be an [SPF lookup failure](/content/spf-too-many-dns-lookups/spf-lookup-failure). However, SPF flattening is a useful and straightforward solution that can significantly solve the failure issue and help with successful email authentication.

![multiple spf records](https://media.mailhop.org/duocircle/images/2020/12/check-domain-spf.png) 

##### Join the thousands of organizations that use DuoCircle

---

Find out how affordable it is for your organization today and be pleasantly surprised.

[Auto SPF - Sign Up FREE](/email/spf-record-check)Interested in our Partner Program for MSPs and VARs? Visit Our [MSP Partner Program](/msp-partner-program).

## Ready to talk?

Same-day response from someone technical. We tell you yes or no quickly. If yes, we get to work.

[Talk to an Expert→](/contact/)[See what we make](/products/)

```json
{"@context":"https://schema.org","@type":"Organization","name":"DuoCircle LLC","url":"https://www.duocircle.com","logo":{"@type":"ImageObject","url":"https://www.duocircle.com/images/duocircle-logo.png"},"description":"DuoCircle is a portfolio of specialized email products covering protection, authentication, delivery, and routing. We deliver about 90% of category-leader capability at roughly half the price, backed by experts who own the outcome. Trusted by 50,000+ organizations since 2014.","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.linkedin.com/company/duocircle","https://x.com/duocirclellc","https://www.facebook.com/duocirclellc","https://www.g2.com/products/phish-protection-by-duocircle/reviews","https://github.com/duocircle","https://www.crunchbase.com/organization/duocircle-llc"],"contactPoint":{"@type":"ContactPoint","contactType":"customer support","url":"https://support.duocircle.com"},"knowsAbout":["Email Security","Email Authentication","SPF","DKIM","DMARC","Phishing Protection","Spam Filtering","SMTP Relay","Email Deliverability","Email Forwarding"]}
```

```json
{"@context":"https://schema.org","@type":"WebSite","name":"DuoCircle LLC","url":"https://www.duocircle.com","description":"DuoCircle is a portfolio of specialized email products covering protection, authentication, delivery, and routing. We deliver about 90% of category-leader capability at roughly half the price, backed by experts who own the outcome. Trusted by 50,000+ organizations since 2014.","publisher":{"@type":"Organization","name":"DuoCircle LLC","url":"https://www.duocircle.com","logo":{"@type":"ImageObject","url":"https://www.duocircle.com/images/duocircle-logo.png"},"description":"DuoCircle is a portfolio of specialized email products covering protection, authentication, delivery, and routing. We deliver about 90% of category-leader capability at roughly half the price, backed by experts who own the outcome. Trusted by 50,000+ organizations since 2014.","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":"WebPage","name":"What Is SPF Flattening, And How Does It Work?","description":"Join the thousands of organizations that use DuoCircle Find out how affordable it is for your organization today and be pleasantly surprised.Interested in ","url":"https://www.duocircle.com/content/spf-too-many-dns-lookups/spf-flattening/","speakable":{"@type":"SpeakableSpecification","cssSelector":[".page-answer",".duo-rich-text p:first-of-type"]},"dateModified":"2023-06-28T13:34:30.000Z","datePublished":"2020-12-26T17:46:33.000Z"},{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"DuoCircle","item":"https://www.duocircle.com/"},{"@type":"ListItem","position":2,"name":"What Is SPF Flattening, And How Does It Work?","item":"https://www.duocircle.com/content/spf-too-many-dns-lookups/spf-flattening/"}]}]
```
