---
title: SPF Flattening
description: Sendmarc's SPF Optimization feature helps reduce DNS lookups within your SPF record ensuring compliance and maintaining email deliverability and security
---

[Skip to content](https://help.sendmarc.com/spf-flattening#main-content)

- [English](https://help.sendmarc.com/spf-flattening)
- [Español](https://help.sendmarc.com/es/optimizacion-de-fps)

English

Show submenu for translations

[Log a New Ticket](https://help.sendmarc.com/kb-tickets/new?hsLang=en)

[![Sendmarc-Logo-Dark.png\]](https://help.sendmarc.com/hs-fs/hubfs/Sendmarc-Logo-Dark.png?height=24&name=Sendmarc-Logo-Dark.png)](https://help.sendmarc.com?hsLang=en)

- [Home](https://help.sendmarc.com/)
- [View Tickets](https://connect.sendmarc.com/tickets-view)
- [Provide Product Feedback](https://sendmarc.notion.site/29c84b281bbf80868e2fc569ede1b8be?pvs=105)

Open main navigation

Close main navigation

- [Home](https://help.sendmarc.com/)
- [View Tickets](https://connect.sendmarc.com/tickets-view)
- [Provide Product Feedback](https://sendmarc.notion.site/29c84b281bbf80868e2fc569ede1b8be?pvs=105)
- - [English](https://help.sendmarc.com/spf-flattening)
    - [Español](https://help.sendmarc.com/es/optimizacion-de-fps)

  English
  
  Show submenu for translations
- [Log a New Ticket](https://help.sendmarc.com/kb-tickets/new)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Sendmarc Help Center | DMARC & Email Security Support](https://help.sendmarc.com/?hsLang=en)
2. [Portal Guides](https://help.sendmarc.com/portal-guides?hsLang=en)
3. [Domain Management](https://help.sendmarc.com/portal-guides?hsLang=en#domain-management)

# SPF Flattening

## Sendmarc's SPF flattening feature helps reduce DNS lookups within your SPF record ensuring compliance and maintaining email deliverability and security

Before enabling SPF flattening (aka SPF Optimization), it's important to understand the problem it addresses and how it functions.

 

**Sections in the article:**

- [SPF and DNS Lookup Limits](https://help.sendmarc.com/spf-flattening#spf-dns-lookup-limits)
- [SPF Optimization](https://help.sendmarc.com/spf-flattening#spf-optimization)
- [Enabling SPF Optimization](https://help.sendmarc.com/spf-flattening#enabling-spf-optimization)

 

### SPF and DNS Lookup Limits

The SPF (Sender Policy Framework) RFC specification imposes a DNS lookup limit, restricting domain owners to a maximum of 10 DNS lookups in their SPF record. Although this might seem sufficient, domain owners often reach this limit due to nested lookups used by their service provider. Nested lookups count toward the total number of lookups in the SPF record.

It is common practice for service providers to supply a single address that hosts their IPs and IP ranges that are used to send email. This allows them to easily manage and change their sending IPs without requiring changes to the customer's DNS setup.

For example including Google's SPF record alone will result in four extra lookups, adding this record:

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

 

Will have the following result:

```
v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all
```

 

To conclude, four lookups were queried:

- include:spf.protection.outlook.com (Original Lookup)
- include:\_netblocks.google.com (Nested Lookup)
- include:\_netblocks2.google.com (Nested Lookup)
- include:\_netblocks3.google.com (Nested Lookup)

 

The problem quickly escalates when you add more service providers, such as your email marketing system or CRM. Exceeding this limit can lead to email filters ignoring the entire SPF record, which may result in delivery and security issues. 

 

### SPF Optimization

Sendmarc provides an SPF Management feature known as SPF Optimization. When activated, this feature continuously monitors your SPF record to ensure the number of DNS lookups remains within the permissible limit.

SPF Optimization automatically changes your SPF record, resolving all lookups (including nested lookups) down to the IP address level when lookup limit is reached. We do this because IP addresses and ranges are not directly counted against the DNS lookup limit. We will only publish the IP addresses and ranges, while you may see spf.google.com in the Sendmarc interface, the internet will see all the Microsoft IPs.

Resolution happens on a continuous basis, so no changes made by a provider are missed.

 

This feature is only available to customers making use of the Sendmarc SPF Management feature.

 

### Enabling SPF Flattening

 

**Steps to follow:**

1. Navigation to **Domains** in the left navigation bar.  
   ![](https://help.sendmarc.com/hs-fs/hubfs/undefined-Dec-06-2024-10-37-12-7647-AM.png?width=282&height=71&name=undefined-Dec-06-2024-10-37-12-7647-AM.png)
2. Click on the **Pencil icon** to edit a domain from the list, alternatively click the domain name in the list.
   
   | ![](https://help.sendmarc.com/hs-fs/hubfs/image-png-Jul-08-2026-12-29-30-8188-PM.png?width=670&height=76&name=image-png-Jul-08-2026-12-29-30-8188-PM.png) |
   | --- |
3. On the **Domain Settings** page, click on the **SPF** tab confirm the correct settings have been imported/applied and make necessary adjustments where needed.
   
   | ![](https://help.sendmarc.com/hs-fs/hubfs/image-png-Jul-16-2026-06-20-44-8383-PM.png?width=670&height=428&name=image-png-Jul-16-2026-06-20-44-8383-PM.png) |
   | --- |
4. SPF Flattening will be disabled by default, click **ENABLED**
   
   | ![](https://help.sendmarc.com/hs-fs/hubfs/image-png-Jul-16-2026-06-38-14-2841-PM.png?width=670&height=100&name=image-png-Jul-16-2026-06-38-14-2841-PM.png) |
   | --- |
5. Click **SAVE**, to save your changes.
6. The results of flattening will show once saved.
   
   | ![](https://help.sendmarc.com/hs-fs/hubfs/image-png-Jul-16-2026-06-57-25-5148-PM.png?width=670&height=137&name=image-png-Jul-16-2026-06-57-25-5148-PM.png) |
   | --- |

   Various results are:
   
     - *Optimization is not required*
     - *Includes reduced using roll-up*
     - *Full optimization*

- [Portal Guides](https://help.sendmarc.com/portal-guides?hsLang=en#main-content)

    - [Dashboards & Reports](https://help.sendmarc.com/portal-guides?hsLang=en#dashboards-reports)
    - [Data Interpretation](https://help.sendmarc.com/portal-guides?hsLang=en#data-interpretation)
    - [Domain Management](https://help.sendmarc.com/portal-guides?hsLang=en#domain-management)
    - [Account Management](https://help.sendmarc.com/portal-guides?hsLang=en#account-management)
    - [User Management](https://help.sendmarc.com/portal-guides?hsLang=en#user-management)
    - [On-Demand MSP](https://help.sendmarc.com/portal-guides?hsLang=en#on-demand-msp)
    - [Breach Detection](https://help.sendmarc.com/portal-guides?hsLang=en#breach-detection)
- [Partner Portal Guides](https://help.sendmarc.com/partner-portal-guides?hsLang=en#main-content)

    - [Partner Tools](https://help.sendmarc.com/partner-portal-guides?hsLang=en#partner-tools)
- [Other](https://help.sendmarc.com/other?hsLang=en#main-content)

    - [Scripts](https://help.sendmarc.com/other?hsLang=en#scripts)
- [Integrations](https://help.sendmarc.com/integrations?hsLang=en#main-content)

    - [Abnormal](https://help.sendmarc.com/integrations?hsLang=en#abnormal)
    - [ConnectWise](https://help.sendmarc.com/integrations?hsLang=en#connectwise)
    - [Acronis](https://help.sendmarc.com/integrations?hsLang=en#acronis)
    - [HaloPSA](https://help.sendmarc.com/integrations?hsLang=en#halopsa)
    - [Autotask (Datto) (Kaseya)](https://help.sendmarc.com/integrations?hsLang=en#autotask-datto-kaseya)

[![Chill listening crop-3](https://help.sendmarc.com/hs-fs/hubfs/Sendmarc-Logo.png?width=139&height=24&name=Sendmarc-Logo.png "Chill listening crop-3")](https://sendmarc.com/)

Copyright © 2025, Sendmarc