Decorative blue gradient overlay

SPF Generator

Build a valid SPF record for your domain.

Decorative purple gradient overlay
Network tool icon

About SPF Generator

Sender Policy Framework (SPF) lets receiving mail servers verify that your domain authorizes the sending IPs. A correct SPF record improves deliverability and reduces spoofing.

This generator helps you build a standards‑compliant record without memorizing syntax. You can:

  • Add include: mechanisms for providers (e.g., Google Workspace, Microsoft 365, SendGrid).
  • Specify ip4: and ip6: ranges you own.
  • Toggle a and mx mechanisms for your domain.
  • Optionally use redirect= to delegate policy to another hostname.
  • Choose the final policy (-all, ~all, ?all, +all).

Why it’s useful:

  • Avoids common syntax mistakes and stray spaces.
  • Keeps you mindful of the 10 DNS‑lookup limit to prevent permerror.
  • Outputs a compact record that’s ready to copy and publish.

How to publish: create a TXT record at your root (e.g., example.com) with the generated value. Use a modest TTL (e.g., 1 hour) while testing. For separate policies per subdomain, publish on that subdomain or use redirect=.

Tips: prefer provider include:s over listing many IPs; keep each string under 255 characters and total DNS lookups ≤ 10; avoid +all in production. After publishing, validate with the SPF Checker on this site and send test emails to confirm SPF/DKIM/DMARC alignment.

Illustration for SPF generator