---
title: SPF
description: Sender Policy Framework — DNS TXT record listing which hosts may send mail for a domain; limited to 10 DNS lookups.
url: https://www.factualminds.com/glossary/spf/
publishDate: 2026-07-22
updateDate: 2026-07-22
---

# SPF

> Sender Policy Framework — DNS TXT record listing which hosts may send mail for a domain; limited to 10 DNS lookups.

## Definition

**SPF** (Sender Policy Framework) is a DNS TXT record on a domain (or MAIL FROM domain) that lists which IP addresses / includes are authorized to send mail for that domain. Receivers check the SMTP envelope sender (Return-Path) against SPF. Common mechanisms include `ip4:`, `ip6:`, `include:`, and `a`/`mx`.

## When to use it

- Every sending domain and custom MAIL FROM domain used with Amazon SES or any ESP
- As one leg of DMARC (alongside DKIM) for bulk-sender compliance

## When not to use it

- Flattening dozens of vendor includes into a single static IP list you never update — breaks when vendors rotate
- Relying on SPF alone for brand protection — DMARC + DKIM are required for modern bulk rules

## Tips

- Stay under the **10 DNS lookup** limit (`include`, `a`, `mx`, `redirect`, and `exists` count)
- Prefer SES **custom MAIL FROM** so SPF authenticates a domain you control and can align for DMARC
- Use `~all` (softfail) or `-all` (fail) intentionally; softfail is common during migration

## Gotchas

### Serious

- **Lookup limit exceeded** → SPF PermError → DMARC alignment fails even if “you included everyone”
- Publishing SPF on the organizational domain but sending with a Return-Path that never matches

### Regular

- Multiple SPF TXT records on the same name (invalid) instead of one merged record

## Related FactualMinds content

- [DMARC](/glossary/dmarc/) · [DKIM](/glossary/dkim/) · [Amazon SES](/glossary/amazon-ses/)
- [SendGrid → SES migration](/blog/how-to-migrate-from-sendgrid-to-amazon-ses/)

## Related AWS Services

- aws-ses
- aws-ses-migration

## Related Posts

- how-to-migrate-from-sendgrid-to-amazon-ses
- amazon-ses-cold-email-b2b-compliance-deliverability-2026
- bimi-amazon-ses-implementation-guide

---

*Source: https://www.factualminds.com/glossary/spf/*
