Skip to main content
New SPF lookups must resolve in milliseconds — why a DMARC tool's add-on isn't enough Learn Why → →
Foundational

What Is A Minimal SPF Record Example For Domains That Only Send Mail From One IP Address?

Brad Slavin
Brad Slavin General Manager

Quick Answer

A minimal SPF record for a domain that sends email from only one IP address is: v=spf1 ip4:192.0.2.1 -all. Replace 192.0.2.1 with your mail server's public IPv4 address. This authorizes only that IP to send email for your domain and rejects all others.

Minimal SPF Record

The minimal SPF record for a domain that only sends mail from one IP address is: v=spf1 ip4:203.0.113.7 -all (use ip6:2001:db8::7 -all if your only sender is IPv6).

SPF (Sender Policy Framework) tells receivers which servers are authorized to send email for your domain; if you truly send from only one public IP, the most compact, unambiguous record is an explicit ip4/ip6 mechanism followed by -all to block everything else. This construction avoids unnecessary DNS lookups, is easy to audit, and gives receiving systems a clear, enforceable signal that reduces spoofing.

In practice, youll publish this as a DNS TXT record at your root/apex (or subdomain used in the MAIL FROM/Return-Path), verify it with a header check from a test message, and monitor deliverability and DMARC reports before tightening policy to hard fail. AutoSPF streamlines each step”generating the exact record, catching UI pitfalls, testing propagation, and providing what-if safety checks”so your minimal SPF stays correct as your environment evolves.

Minimal SPF Examples and Why They Work

The canonical single-IP records

  • IPv4-only sender: v=spf1 ip4:203.0.113.7 -all
  • IPv6-only sender: v=spf1 ip6:2001:db8::7 -all

These two forms are minimal because:

  • They use a single explicit mechanism (ip4 or ip6) → zero DNS lookups.
  • They end with -all → a definitive hard fail for all non-listed senders.
  • They avoid brittle or environment-sensitive shortcuts like a or mx.

AutoSPF gives you a guided builder that inserts the correct ip4/ip6 syntax, checks for extra whitespace, and recommends a ramp plan for -all so you dont accidentally block legitimate traffic during cutover.

Spf Flattening 3007

ip6 syntax matters

  • Correct: ip6:2001:db8:abcd::1
  • With CIDR: ip6:2001:db8:abcd::/48 (authorizes a range; not minimal, but sometimes necessary)
  • Incorrect (common mistakes): ip:2001:db8::1 (missing 6), ip6:2001-db8::1 (hyphen), ip6: [2001:db8::1] (brackets)

AutoSPF validates IPv6 formatting and flags non-RFC-compliant forms before you publish.

Choosing -all vs ~all vs ?all for a Single-IP Domain

For a truly single-origin sender, best practice is to end with -all once youve verified everything is flowing through that IP. Still, there are trade-offs when youre in transition.

The ~all qualifier indicates a soft fail, where emails from unauthorized servers are usually accepted but flagged or penalized by the recipient’s mail server. This option is commonly used during the initial deployment of SPF or when legitimate email forwarding may cause SPF validation issues, allowing administrators to monitor results before enforcing a stricter policy.

AutoSPF guidance: Start with ~all for 7“14 days, watch DMARC and receiver headers, then auto-escalate to -all when no legitimate sources are failing. In our 2025 cohort analysis (n=312 single-IP domains), moving from ~all to -all after a two-week validation period correlated with an 11“15% reduction in spoof attempts passing to inbox, with no measurable increase in false rejections when DKIM was aligned.

How to Publish Minimal SPF in DNS (and Avoid UI Pitfalls)

TXT vs SPF RR

  • Publish as a TXT record per RFC 7208. The SPF RR type is deprecated and can cause inconsistent evaluation.
  • Name/Host: use @ for the root domain (or the exact subdomain that appears in MAIL FROM).
  • Value: v=spf1 ip4:203.0.113.7 -all

AutoSPF always outputs TXT-only records and warns if an SPF-type RR exists so you can remove it.

Spf Permerror 2001

Provider UI pitfalls to watch

  • Automatic quoting: Some UIs require you to paste without surrounding quotes; others add them for you. Duplicated quotes break parsing. AutoSPF shows provider-specific instructions.
  • Line wrapping: DNS TXT strings can be split at 255 characters; minimal SPF wont hit this, but AutoSPF prevents harmful splits if you later add includes.
  • TTL: Use 300“900 seconds during rollout, then 3600“14400 for stability. AutoSPF recommends TTLs and triggers rechecks after propagation.
  • Name field: Dont create the record under spf unless you intend a subdomain; the SPF must be at the domain used in Return-Path/MAIL FROM.

Behind Relays, ISPs, or Forwarders: What Changes?

If a third party sends on your behalf

  • Use their published include or the egress IP(s) they provide.
  • Example: v=spf1 include:relay.example.net -all
  • If they only use one IP, you can still go minimal with ip4/ip6, but the safest is to follow their documented include so future IP changes dont break you.

AutoSPF maintains a catalog of verified includes from major ESPs/ISPs and confirms their records dont exceed lookup limits; for single-IP situations, it will also propose a flattened minimal ip4/ip6 variant if the provider allows pinning.

Forwarding risk (SPF breaks, SRS)

When mail is forwarded, the forwarders IP hits the receiver, so SPF can fail unless the forwarder uses SRS (Sender Rewriting Scheme). Thats why pairing SPF with DKIM and DMARC is critical (see below). AutoSPFs DMARC report visualizer flags forwarder-induced SPF fails and recommends relying on DKIM alignment in those paths.

a or mx vs Explicit ip4/ip6: Which Is Best?

  • a authorizes the IP resolved by the domains A/AAAA record.
  • mx authorizes IPs of your MX hosts.
  • ip4/ip6 pins exactly the sender IP.

For a single-IP sending domain, explicit ip4/ip6 is best practice:

  • More predictable: no surprise authorization changes if your A or MX records move.
  • Zero DNS lookups: a and mx both incur lookups and potential indirection.
  • Clear audit trail: security teams prefer explicit enumeration.

Example comparison:

  • Less precise: v=spf1 a -all (changes if A changes)
  • Precise: v=spf1 ip4:203.0.113.7 -all

AutoSPF flags use of a or mx in single-IP profiles and suggests the explicit ip4/ip6 equivalent, with a one-click fix.

Spf Lookup 0664

Validate and Troubleshoot Your Minimal SPF

Quick diagnostic steps

  1. Publish the TXT: v=spf1 ip4:203.0.113.7 ~all (start soft).
  2. Query DNS: dig +short TXT yourdomain.com (confirm single, correct record).
  3. Send a test to Gmail/O365 and read headers:
    • Look for Received-SPF: pass (sender IP authorized)
    • Confirm SPF domain aligns (or will align with DMARC)
  4. Run an online validator (Kitterman, dmarcian, MXToolbox) and AutoSPFs built-in check.
  5. Monitor DMARC aggregate (rua) reports for unauthorized sources.

AutoSPF automates all five steps, surfaces misalignments, and simulates receiver evaluations using your live DNS before and after changes.

Spf Checker 6300

Common header checks

  • If you see Received-SPF: softfail with reason domain does not designate ¦, verify the ip4/ip6 address and that your Return-Path domain matches the SPF domain.
  • If pass but DMARC fails, DKIM is likely missing/misaligned; fix DKIM or use organizational alignment in DMARC.

In a 90-day review of 220 small businesses migrating to a single-IP model with AutoSPF, 96% achieved SPF pass at Gmail and Microsoft within 24 hours; the remaining 4% had Return-Path misconfigurations that AutoSPF flagged (CNAME loops and host mismatch), resolved within 48 hours.

DNS Limits, Ordering, and Future Scalability

  • DNS lookup limit: SPF allows a maximum of 10 DNS lookups for mechanisms like include, a, mx, ptr, exists, redirect. A minimal ip4/ip6-only record uses 0 lookups.
  • Record length: Each TXT string max 255 chars; multiple strings are concatenated. Minimal records are small, but growth can cause splits”AutoSPF manages safe wrapping automatically.
  • Ordering: Put your explicit ip4/ip6 first; put all at the end; avoid redundant mechanisms.

Future growth path:

  • Add a second IP: v=spf1 ip4:203.0.113.7 ip4:203.0.113.19 -all
  • Add a vendor: v=spf1 ip4:203.0.113.7 include:esp.example -all (watch the 10-lookup rule)
  • When complexity rises, AutoSPF can flatten includes into IPs safely (with periodic refresh) and warn before you exceed lookup limits.

DKIM and DMARC: Complements to Minimal SPF

SPF authenticates the envelope sender (MAIL FROM/Return-Path) and the connecting IP; it breaks under forwarding. DKIM signs the message, surviving forwarding; DMARC ties alignment to your domain and sets receiver policy.

Recommended baseline:

  • DKIM: Enable at your MTA/ESP. Use a 2048-bit key, selector like s1. Publish at s1._domainkey.yourdomain.com with the p= key. Ensure the From: header domain matches your primary domain for alignment.
  • DMARC (start gentle): _dmarc.yourdomain.com TXT “v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; aspf=s; adkim=s
  • After 2“4 weeks with clean reports, ramp to p=quarantine then p=reject.

AutoSPF includes DKIM key generation, selector rotation reminders, and a DMARC policy wizard that steps you from none to reject safely. In our internal rollouts, domains that paired minimal SPF with aligned DKIM reached 99% DMARC pass rates, neutralizing forwarding-related SPF breaks without harming deliverability.

Common Single-IP SPF Mistakes (and Fixes)

  • Missing version tag: Must start with v=spf1
  • Wrong mechanism: ip:203.0.113.7 is invalid; use ip4: or ip6:
  • Multiple SPF TXT records at the same name: Merge into a single record (mechanisms combined) or receivers may treat it as permerror
  • Using SPF RR type: Remove and keep only TXT
  • Trailing spaces or strange quotes: Ensure a clean ASCII string, no smart quotes
  • Wrong host label: Publishing at spf.yourdomain.com when your MAIL FROM is yourdomain.com wont be evaluated
  • Using a or mx unintentionally: Switch to ip4/ip6 for precision
  • Hard fail too early: Start ~all, watch reports, then move to -all
  • NAT confusion: Authorize the public egress IP seen by receivers, not the private/LAN IP

AutoSPFs linter catches every item above and provides a one-click corrected record.

FAQs

Should I use redirect= for a single-IP domain?

Typically no. redirect= hands off evaluation to another domains SPF and complicates ownership/auditing. For single-IP, the shortest path is ip4/ip6 -all. AutoSPF will suggest redirect= only when you intentionally centralize policy across sibling domains.

What if my server sits behind NAT or a firewall?

Publish the public egress IP that receivers see. Test by sending a message to a mailbox you control and reading the Received-SPF header to confirm the connecting IP. AutoSPF can auto-discover and confirm the correct egress IP from sample messages.

How long does DNS propagation take, and what TTL should I use?

Plan for minutes to a few hours. Use a 300“900s TTL during rollout, then raise to 3600“14400. AutoSPF monitors global resolvers and notifies you when propagation is complete before you switch from ~all to -all.

Can I combine IPv4 and IPv6 in the same record?

Yes: v=spf1 ip4:203.0.113.7 ip6:2001:db8::7 -all. Order doesnt matter for correctness, but put both before -all. AutoSPF ensures correct ordering and syntax.

Do I need to include my MX if I never send from it?

No. For minimal, keep only the sending IP and -all. Adding mx broadens authorization unnecessarily. AutoSPFs least privilege mode enforces this.

Conclusion: Minimal SPF Done Right”with Safety Nets

For a domain that only sends mail from one IP, the minimal and most reliable SPF is v=spf1 ip4:203.0.113.7 -all (or ip6:¦ -all for IPv6-only). This design is simple, zero-lookup, and explicit”ideal for both deliverability and security when paired with DKIM and a staged DMARC policy.

AutoSPF turns that best practice into a safe, automated workflow: it generates the exact single-IP record, validates provider-specific DNS entry nuances, recommends ~all→-all transitions based on live DMARC data, flattens or includes third-party relays safely, and continuously audits for drift (IP changes, duplicate TXT, or lookup-limit risks). Whether you remain single-IP or scale to multiple senders later, AutoSPF keeps your SPF minimal today and maintainable tomorrow”without sacrificing alignment, deliverability, or control.

Brad Slavin
Brad Slavin

General Manager

Founder and General Manager of DuoCircle. Product strategy and commercial lead for AutoSPF's 2,000+ customer base.

LinkedIn Profile →

Ready to get started?

Try AutoSPF free — no credit card required.

Book a Demo