Skip to main content

New

Test your email deliverability

Send a test email and get a complete diagnosis of your SPF, DKIM and DMARC authentication in seconds.

  • Real send test
  • Instant diagnosis
  • No signup required

Free SPF Record Generator

Build a valid SPF record in seconds with 14 preconfigured providers

Free SPF generator with Google Workspace, Microsoft 365, SendGrid and 11 other preconfigured providers. Automatic DNS lookup counting to stay under the limit of 10. Copy your TXT record and publish it immediately.

The domain for which to generate the SPF record.

Select the email services you use to send emails from this domain.

Loading providers...
DNS Lookups0 / 10

Additional IPs and includes

Additional mechanisms

Each mechanism adds 1 DNS lookup.

14 preconfigured providers

Google Workspace, Microsoft 365, SendGrid, Mailchimp, Amazon SES, Brevo, HubSpot, Zoho and more. One click to add each provider with the correct include.

DNS lookup counter

View the number of DNS lookups used in real time. Automatic warning if you approach or exceed the limit of 10 imposed by RFC 7208.

Configurable policy

Choose between ~all (softfail recommended for getting started), -all (strict fail) or ?all (neutral). Explanation of each option for an informed choice.

Custom IPs

Add your IPv4, IPv6 addresses or CIDR ranges. Real-time validation to prevent syntax errors.

Deployment instructions

Step-by-step guide to publish your SPF. Direct links to the SPF Checker to verify and the DMARC Generator to complete your authentication.

What is an SPF record?

SPF (Sender Policy Framework) is an email authentication mechanism defined in RFC 7208. It allows a domain to declare which servers are authorized to send emails on its behalf.

Why configure SPF:

  • Protect your domain — Prevents email spoofing
  • Improve deliverability — Legitimate emails are better accepted by recipients
  • DMARC prerequisite — SPF is one of the two pillars of DMARC authentication (along with DKIM)
  • Industry standard — All major providers (Gmail, Outlook, Yahoo) check SPF

SPF record syntax

An SPF record is a DNS TXT record that always starts with v=spf1:

v=spf1 include:_spf.google.com include:sendgrid.net ip4:192.0.2.1 ~all

SPF mechanisms

MechanismDescriptionExampleDNS Lookup
include:Includes the SPF of another domaininclude:_spf.google.comYes
ip4:Authorizes an IPv4 address or rangeip4:192.0.2.1 or ip4:192.0.2.0/24No
ip6:Authorizes an IPv6 address or rangeip6:2001:db8::1No
aAuthorizes the IP of the domain's A recorda or a:mail.example.comYes
mxAuthorizes the domain's MX serversmxYes
allDefines the default behavior-all, ~all, ?allNo

Policy qualifiers

PolicySyntaxMeaningRecommendation
Fail-allReject unauthorized emailsProduction (after testing)
Softfail~allMark as suspicious but acceptRecommended to start
Neutral?allNo policy (weak protection)Not recommended

The 10 DNS lookup limit

RFC 7208 imposes a maximum of 10 DNS lookups during SPF record evaluation. This is a strict limit that, if exceeded, causes a permerror and validation failure.

What counts as a lookup

MechanismCounts as lookup?Note
include:Yes (+ nested lookups)Google = ~4 lookups
aYes
mxYes+ 1 per resolved MX
redirect=Yes
exists:Yes
ip4: / ip6:NoUse these to save lookups
allNo

Lookup count example

v=spf1 include:_spf.google.com include:sendgrid.net include:servers.mcsv.net mx ~all
MechanismLookups
include:_spf.google.com4
include:sendgrid.net1
include:servers.mcsv.net1
mx1
Total7 / 10

Our generator displays this counter in real time to help you stay under the limit.


Preconfigured email providers

Our generator includes 14 providers with their official SPF includes:

ProviderSPF IncludeDNS Lookups
Google Workspace_spf.google.com~4
Microsoft 365spf.protection.outlook.com~2
SendGridsendgrid.net1
Mailchimpservers.mcsv.net1
Amazon SESamazonses.com1
Brevo (Sendinblue)sendinblue.com1
Mailgunmailgun.org1
Postmarkspf.mtasv.net1
HubSpotspf.hubspot.com1
Salesforce_spf.salesforce.com~2
Zendeskmail.zendesk.com1
Freshdeskemail.freshdesk.com1
Zohozoho.com1
Klaviyo_spf.klaviyo.com1

FAQ - Frequently Asked Questions

Q: How do I create an SPF record for my domain?

A: Use our generator: 1) Select your email providers, 2) Add your custom IPs if needed, 3) Choose the policy (~all recommended), 4) Copy the TXT record and add it to your DNS zone.


Q: What is the 10 DNS lookup limit in SPF?

A: RFC 7208 imposes a maximum of 10 DNS lookups. Each include, a, mx, redirect and exists counts. ip4/ip6 don't count. Exceeding this limit causes a permerror.


Q: What's the difference between ~all and -all?

A: ~all (softfail) marks unauthorized emails as suspicious. -all (fail) rejects them. Start with ~all for testing, then switch to -all in production.


Q: Can I have multiple SPF records?

A: No, a domain must have only one SPF. Multiple SPF records cause a permerror. Combine your providers into a single record.


Q: How do I configure SPF for Google Workspace?

A: Add include:_spf.google.com. Our generator does this automatically. This include counts for ~4 DNS lookups.


Q: How do I configure SPF for Microsoft 365?

A: Add include:spf.protection.outlook.com. Our generator adds it when you select Microsoft 365. Counts for ~2 lookups.


Q: How do I fix "too many DNS lookups"?

A: 1) Remove unused includes, 2) Replace some includes with direct IPs (ip4/ip6), 3) Use an SPF flattening service. Our generator displays the counter to prevent this issue.


ToolPurpose
SPF Record CheckVerify your published SPF and its validity
SPF Syntax CheckValidate SPF syntax before publishing
DKIM GeneratorCreate your DKIM keys (RSA/Ed25519)
DMARC GeneratorConfigure DMARC to complete authentication
Mail TesterTest your email deliverability

Useful resources