
An SPF record is a simple setting added to your domain that tells email servers which senders are allowed to send emails on your behalf. Without it, there is no clear way for receiving servers to check if your emails are genuine.
Understanding what an SPF record is can help you fix deliverability issues and protect your domain from misuse. In this blog, we will break it down in a simple way, show an example of an SPF record, and guide you through how to set it up correctly.
If you are wondering what is an SPF record, it is a simple DNS record that tells email servers who is allowed to send emails from your domain. You add it to your domain settings as a TXT record, and it works like a list of approved senders.
This list can include your own email server and any tools you use to send emails, like marketing or support platforms. When someone gets an email from your domain, their mail server checks this list to see if the sender is allowed.
An SPF record matters because scammers often send phishing and spoofing emails pretending to be you. SPF helps spot these fake emails and stops them from reaching inboxes. In simple terms, SPF helps ensure only the right people can send emails from your domain.
Here's how an SPF record works in a real scenario:
First, a mail server sends an email using a specific return path address, for example, [email protected]. This return path is used by receiving servers to verify the sender.
Next, the receiving mail server extracts the domain from the return path and looks up its DNS records to find the SPF record.
Once it finds the SPF record, it looks at the list of allowed sending sources. It then compares the sending server's IP address with the IPs mentioned in that list.
If the IP address matches, the SPF check passes, and the email is accepted. If it does not match, the SPF check fails, and the email may be marked as suspicious or rejected.
To fully understand what is an SPF record, you also need to know how it is written. An SPF record follows a specific format and uses different parts called "mechanisms" and "qualifiers."
Here is a simple example of an SPF record:
v=spf1 ip4:192.168.1.1 include:_spf.google.com ~allLet's break this down step by step in very simple terms.
Version (v=spf1): This part tells email servers that this is an SPF record. Every SPF record always starts with v=spf1.
Mechanisms: These define which senders are allowed:
ip4:192.168.1.1 — Allows this specific IPv4 address to send emailsip6: — Used for IPv6 addressesinclude:_spf.google.com — Allows another service (like Google) to send emails on your behalfa — Allows the IP address linked to your domain's A recordmx — Allows your domain's mail serversQualifiers: These tell receiving servers how to handle emails:
+ (Pass) — Allowed sender- (Fail) — Reject the email completely~ (Soft fail) — Accept but mark as suspicious? (Neutral) — No strict action In our example, ~all means any sender not listed should be treated as suspicious. To explore the difference in detail, see our guide on SPF soft fail vs hard fail vs neutral.
The "all" Mechanism: This is always placed at the end:
-all — Only listed senders are allowed~all — Others are not trusted but not fully blockedHere are the steps to create a properly configured SPF record and ensure nothing is missed:
Start by identifying every service that sends emails on your behalf. This can include your employees, third-party vendors, stakeholders, and marketing tools. Make sure you do not miss anything here. Even one missing source can cause SPF failures and affect your email delivery.
Instead of writing the record manually, you can use the EasyDMARC SPF Record Generator to make the process much easier and faster. You just need to add your sending sources, and the tool will automatically build a clean and accurate SPF record for you.
It not only saves time but also helps you avoid tricky mistakes like wrong syntax, missing services, or exceeding lookup limits. This makes it a reliable option, especially if you are setting up SPF for the first time or managing multiple email tools.
Once your record is ready, go to your domain's DNS settings. Create a new TXT record and paste your SPF value there. Make sure there is only one SPF record for your domain. Having multiple records can break authentication.
After adding the record, use the EasyDMARC SPF Lookup tool to verify everything is set up correctly. It instantly checks your SPF record and shows whether it is valid, active, and working as expected.
The tool also highlights hidden issues like syntax errors, missing sources, or lookup limit problems that are easy to miss manually. This gives you full confidence that your SPF record is correctly configured and ready to support your email authentication.
Finally, send test emails and monitor their results. Check if SPF is passing and keep an eye on your email performance.
If you add new email services in the future, remember to update your SPF record so everything stays aligned.
Even small mistakes in SPF can cause emails to fail authentication or land in spam. Here are some common issues to watch out for:
A domain should have only one SPF record, but many businesses end up creating more than one without realizing it. This usually happens when different teams or tools add their own records separately. When a receiving server encounters multiple SPF records, it cannot determine which to trust, so the check fails. The correct approach is to merge everything into a single record.
SPF has a strict limit of 10 DNS lookups. Each time you use mechanisms like include, a, or mx, it counts toward this limit. If your record crosses this limit, the SPF check fails automatically, even if everything else is correct. This often happens when too many tools are added without proper optimization.
It is very common to forget one of the services that sends emails on your behalf. For example, you might add your main email provider but forget your marketing or CRM tool. When that service sends emails, they fail the SPF check. This can quietly affect important emails like campaigns, invoices, or alerts.
SPF syntax needs to be written carefully. Small mistakes, such as entering the wrong mechanism or entering values in the wrong format, can break the entire record. Even if the record looks fine at first, these errors can stop email servers from reading it correctly, leading to failed authentication.
Some domains use a very open policy like +all, which allows any server to send emails on their behalf. This removes all protection and makes it easy for attackers to misuse your domain. It may seem harmless during setup, but it creates a serious security risk if left unchanged.
Your SPF record should change as your email setup changes. If you start using a new tool or stop using an old one, the record must be updated. If not, valid emails may fail, or old sources may remain authorized longer than they should.
While SPF is a strong starting point, it cannot fully protect your domain on its own. SPF only checks whether the sending source is allowed, but it does not verify the email content or tell receiving servers what to do if something fails. This is where DKIM and DMARC come in.
DKIM helps ensure that the message has not been altered during transit, and DMARC builds on SPF and DKIM to enforce rules and provide visibility into what is happening with your emails. When all three are set up together, your domain becomes much more secure and trustworthy.
EasyDMARC can help you set up and manage SPF, DKIM, and DMARC without the usual confusion. From generating records to monitoring and fixing issues, everything is handled in one place. Reach out to us and start your free trial to get your email authentication right from day one.