SPF Record Generator

Create a valid SPF record for your domain in seconds with our easy-to-use generator

Enter Your Domain

The domain you want to create an SPF record for

Authorized IP Addresses

Specify IP addresses allowed to send email

Mechanisms

Additional authorization methods

Failure Policy

What should happen to emails that don't match?

Understanding SPF Records

What is an SPF Record?

SPF (Sender Policy Framework) is an email authentication method that helps prevent email spoofing by specifying which mail servers are authorized to send email on behalf of your domain.

SPF Mechanisms Explained

ip4: / ip6:
Authorize specific IPv4 or IPv6 addresses or ranges
a
Authorize the IP addresses in your domain's A record
mx
Authorize the IP addresses of your domain's MX records
include:
Include another domain's SPF policy (e.g., for email service providers)
redirect=
Redirect to another domain's SPF record (replaces all other mechanisms)

Policy Qualifiers

-all (Fail)
Reject all emails from unauthorized sources. Most strict policy.
~all (SoftFail)
Mark emails from unauthorized sources as suspicious. Recommended for most use cases.
?all (Neutral)
No policy specified. Not recommended.
+all (Pass)
Accept all emails. NOT RECOMMENDED - defeats the purpose of SPF.
Important Limits:
  • Maximum 10 DNS lookups (each include:, a, mx, exists: counts as 1)
  • Maximum 255 characters per string
  • Only one SPF record per domain

Need SPF Monitoring & Management?

Automatically track SPF record changes, get alerts for DNS lookup limit issues, and manage your sender policy with confidence.

No credit card required • Free monitoring for 14 days • Setup in 5 minutes