SPF (Sender Policy Framework)
Learn how to configure SPF records to prevent email spoofing and improve deliverability.
What is SPF?
SPF is an email authentication method that specifies which mail servers are authorized to send emails on behalf of your domain. It helps prevent email spoofing and phishing attacks.
How to set up SPF
Add a TXT record to your DNS with the following format:
v=spf1 include:_spf.google.com ~allCommon SPF mechanisms
- ip4: - Authorize specific IPv4 addresses (e.g., ip4:192.0.2.0/24)
- include: - Include SPF records from another domain (e.g., include:_spf.google.com)
- mx: - Authorize mail servers listed in MX records
- a: - Authorize IP addresses in A records
- ~all: - Soft fail (recommended for testing)
- -all: - Hard fail (strict policy)
Important limitations
SPF has a limit of 10 DNS lookups. Exceeding this limit will cause SPF to fail. Use our checker to verify your SPF record stays within limits.