What Is an SPF Record?
Last updated
Table of Contents
- What Is an SPF Record?
- How SPF works: authorizing your senders
- Key benefits of SPF:
- Creating, managing, and validating SPF records
- Technical details
- Have more questions?
What Is an SPF Record?
The Sender Policy Framework (SPF) record is a crucial email authentication method that helps prevent unauthorized individuals from sending emails on your domain’s behalf. Its primary purpose is to indicate to receiving mail servers which hosts (IP addresses or domains) are authorized to send email from your domain.
Email spoofing (faking the sender’s address) is common, and SPF records act as a digital permit, allowing receiving mail servers to verify the authenticity of the sender’s origin. This significantly reduces the likelihood of phishing attacks, spam, and other malicious activities that exploit domain impersonation.
Note
SPF records are TXT records. The dedicated SPF record type (type 99) was deprecated by RFC 7208 in 2014. DNSimple stopped supporting it on August 11, 2025, and converted existing SPF-type records to TXT records on September 8, 2025. See our announcement.
How SPF works: authorizing your senders
When an email is sent, the recipient’s mail server performs a lookup of the sender’s domain’s SPF record. This record, which is always a TXT record in DNS, contains a list of IP addresses and/or hostnames that are permitted to send email from that domain.
The process typically follows these steps:
- An email arrives at a recipient’s mail server with
yourdomain.comas its envelope sender (the Return-Path address, which can differ from the From address people see). - The recipient’s mail server identifies the IP address from which the email originated.
- It queries the DNS for the SPF record (a TXT record starting with
v=spf1) foryourdomain.com. - The SPF record contains various mechanisms that list authorized senders (e.g., specific IP addresses, other domains that send on your behalf, your own mail server).
- The recipient’s mail server compares the originating IP address of the email with the list in the SPF record.
- Based on this comparison and the matching mechanism’s qualifier (
+pass,-fail,~softfail, or?neutral), the receiving server decides whether to accept, reject, or mark the email as suspicious.
This mechanism allows you, the domain owner, to explicitly declare your sending policy. This gives receiving mail servers the information they need to make informed decisions about incoming messages.
Key benefits of SPF:
Combats email spoofing: Prevents unauthorized parties from sending emails that appear to originate from your domain.
Improves email deliverability: Emails from domains with properly configured SPF records are more likely to be trusted and delivered to inboxes, avoiding spam folders.
Enhances domain reputation: Helps maintain a positive sending reputation for your domain, which is crucial for overall email success.
SPF is one of three protocols that make up email authentication. It works with DKIM (DomainKeys Identified Mail) and DMARC (Domain-based Message Authentication, Reporting, and Conformance). DMARC is what connects the SPF check to the From address people see.
Creating, managing, and validating SPF records
For step-by-step instructions on how to create, edit, or remove SPF records with DNS hosting at DNSimple, refer to Set Up SPF Records.
For a comprehensive breakdown of the SPF record format, all available mechanisms and modifiers, their specific syntax, and important validation rules (including the 10-DNS-lookup limit), consult our Reference Guide: SPF Record Syntax and Validation Reference.
Technical details
The specification for the Sender Policy Framework is primarily defined in RFC 7208, which supersedes RFC 4408.
Have more questions?
If you have additional questions or need any assistance with your SPF records, just contact support, and we will be happy to help. You can also read more about email forwarding at DNSimple.