Skip to content

What Is SPF, and How Does It Work?

SPF (Sender Policy Framework) is a DNS TXT record that lists which mail servers are allowed to send email on behalf of your domain. Receiving mail servers check the sending server's IP against this list to decide whether a message is likely spoofed.

Last updated August 9, 2026.

A basic SPF record

v=spf1 include:_spf.google.com -all

v=spf1 marks the record version. include:_spf.google.comauthorizes Google Workspace's sending servers. -all is the final mechanism: it tells receivers to reject mail from any server not otherwise listed.

The final qualifier decides everything

  • -all (hard fail) — reject unauthorized senders. The intended end state.
  • ~all (soft fail) — mark unauthorized mail as suspicious; most receivers still deliver it, often to spam. A reasonable staging point while you confirm every sender.
  • ?all (neutral) — makes no judgement. Provides essentially no protection.
  • +all — explicitly authorizes every server on the internet. Never use this.

Common mistakes

  • Publishing two SPF records. RFC 7208 permits exactly one. A second record — often added by a new email tool without checking for an existing one — makes receivers treat SPF as broken and ignore it entirely, which looks configured but protects nothing.
  • Ending in ~all or ?all indefinitely. Soft fail and neutral are meant to be temporary while you verify senders, not a permanent home.
  • Approaching the 10-DNS-lookup limit. Every include:, a, mx, ptr, and exists mechanism costs a lookup, and each nested include: recurses. Exceeding 10 causes a permanent error result, which many receivers treat as an authentication failure.
  • Forgetting a sender. Any service that sends mail as your domain — helpdesk, marketing platform, invoicing tool — needs to be in the SPF record or its mail will fail authentication once you reach -all.

About DKIM

DKIM is a separate, complementary email-authentication mechanism that adds a cryptographic signature to outgoing mail. Nivaronix currently does not perform DKIM verification — this scan checks SPF and DMARC only. If you need DKIM validated, use your mail provider's DKIM test tool or a dedicated mail-auth checker.

Related

Check your SPF record now

Scan your domain free