Email & AuthenticationRFC 7208

SPF Record β€” SPF Record (Sender Policy Framework TXT)

A TXT record that defines which mail servers and IP addresses are authorized to send email on behalf of your domain.

RECORD TYPE

SPF

STANDARD RFC

RFC 7208

DEFAULT TTL

3600 seconds (1 hour)

CATEGORY

Email & Authentication

BIND Zone File Syntax Example

example.com. 3600 IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net ~all"

How to Query & Check SPF Records

Linux / Mac (dig)
dig +short TXT example.com | grep "v=spf1"
Windows / Generic (nslookup)
nslookup -type=TXT example.com
PowerShell (Resolve-DnsName)
(Resolve-DnsName -Name example.com -Type TXT).Strings | Select-String "v=spf1"

Recommended Best Practices

NEVER publish more than one SPF record for a single domain (combine all `include:` mechanisms into one record). RFC 7208 limits SPF lookups to a maximum of 10 DNS queries.

Primary Use Cases:
  • β€’Authorizing Google Workspace, SendGrid, Mailgun, or Postmark to send transactional emails
  • β€’Preventing domain spoofing and phishing attacks
  • β€’Ensuring compliance with Gmail & Yahoo 2024 bulk sender deliverability rules

Common Configuration Mistake

Publishing multiple SPF TXT records, causing receivers to evaluate SPF as PermError and route all emails to spam.

Always verify records using authoritative queries (`dig @1.1.1.1 $SPF example.com`) to bypass local ISP caching when debugging propagation delays.
Frequently Asked Questions

DNS SPF Record Questions & Answers

Common questions regarding DNS propagation, TTL settings, and zone file syntax.

SPF (Sender Policy Framework) prevents spammers from forging "From:" addresses using your domain. Receiving mail servers check SPF during SMTP handshake; messages sent from unauthorized IPs are marked as spam or rejected.