Create a valid SPF record for your domain to prevent email spoofing.
v=spf1 ~all
Enter your domain and we'll fetch its live SPF record, load it into the generator, and flag problems like duplicate records.
@Select the services that send email on behalf of your domain.
Sending from your own server with self-hosted software like Broadcast? Add your server's IP address under Advanced Options below.
What should happen when an email fails SPF validation?
Add additional domains (one per line)
CIDR notation supported
CIDR notation supported
SPF (Sender Policy Framework) is a DNS TXT record that lists the servers allowed to send email for your domain. When your message arrives, the receiving server checks whether the sending server is on that list. If it is, your mail looks legitimate. If it isn't, your mail gets flagged or rejected, depending on your policy.
Without SPF, anyone can put your domain in the From address and most receivers have no way to tell the difference. Gmail, Yahoo, and Microsoft now expect SPF on every sending domain, so a missing record hurts deliverability even if nobody is spoofing you.
The receiving server takes the domain from the envelope sender (the return-path, not the visible From address), fetches its TXT records, and evaluates each mechanism left to right. The first match wins. If nothing matches, the all mechanism at the end decides the result: soft fail, hard fail, or neutral.
Because SPF checks the envelope sender, it can't stop a forged From header by itself. That is DMARC's job, and it's why the two belong together.
10 DNS lookups max
Every include, a, mx, exists, and redirect costs one lookup, and includes nest. Go over and receivers return a permanent error.
One record per domain
Two SPF records is an automatic failure. Merge everything into one.
255 characters per string
Longer records must be split into multiple quoted strings inside one TXT record. Most DNS providers do this for you.
~all (soft fail) tells receivers to accept but distrust unlisted servers. -all (hard fail) tells them to reject outright. Start with soft fail while you confirm every legitimate sender is in your record, then move to hard fail. And never use +all: it authorizes the entire internet to send as you.
Google Workspace only:
v=spf1 include:_spf.google.com ~all
Google Workspace for regular mail plus Amazon SES for campaigns:
v=spf1 include:_spf.google.com include:amazonses.com ~all
A self-hosted mail server at a fixed IP address, with hard fail:
v=spf1 ip4:203.0.113.25 -all
Every SPF record starts with v=spf1, which marks the TXT record as an SPF record, version 1. There is no version 2. A record that does not start with v=spf1 is ignored by receiving servers.
No. SPF validates the envelope sender, an address recipients never see, so a forged From header can still pass. To actually stop spoofing, pair SPF with DKIM signatures and a DMARC policy that ties the two back to the visible From address.
Often, yes. When someone forwards your email, it arrives from the forwarder's server, which is not in your SPF record, so the check fails. This is a known weakness of SPF, not a mistake in your record. DKIM signatures survive forwarding, which is one more reason to set up both.
Yes, if you send mail from them. Receivers check the exact domain in the envelope sender, so mail from news.example.com needs an SPF record on news.example.com. A record on the root domain does not cover its subdomains.
Flattening replaces include mechanisms with the IP addresses they resolve to, cutting DNS lookups to zero so large setups fit under the 10 lookup limit. The trade-off: providers change their IPs without notice, so a flattened record goes stale unless something keeps it updated. Only flatten when you are actually hitting the limit.
As soon as your DNS change propagates, which is governed by your TTL setting. For most domains that means minutes to an hour. You can verify the record is live by querying your domain's TXT records or running a DMARC test.
Use the lookup at the top of this page to fetch and check the record you published, or run your domain through our DMARC testing tool to validate SPF, DKIM, and DMARC together. You can also send a test email to a Gmail address and use Show Original to see the SPF verdict.
Not sure your setup is right? Run your domain through our DMARC testing tool to check SPF, DKIM, and DMARC in one pass.
Broadcast is self-hosted email marketing software. Pay once, own it forever, and take full control of your email infrastructure.
One-time payment, unlimited emails forever
"I was tired of spending hundreds per month on Beehiiv. Then I found Broadcast and now I can scale at my own pace without burning money I worked hard for."
@bensnichedsitesFor technical founders & developers
For agencies and consultants managing multiple client deployments