Bridge CDN
On this page

Before you start

SPF (RFC 7208) tells receiving servers which machines may send mail for your domain. Getting it right is mostly about the list, not the DNS entry. So before you open the zone editor, collect:

  • Your mailbox provider's SPF value. It's usually an include: such as include:_spf.example.net.
  • Every other service that sends as your domain. Newsletter tools, help desks, invoicing systems, a web server sending contact-form mail.
  • Any existing SPF record. Run dig example.com TXT +short and look for a string starting with v=spf1.

One record only. A domain may publish a single SPF record. If one already exists, edit it. Adding a second one breaks SPF for all your mail.

How to add SPF record values in Bridge DNS

Here's how to add an SPF record step by step.

  1. Open your zone and choose Add record.
  2. Set the type to TXT and the name to @ for the domain itself.
  3. Paste your policy as the value, for example:
v=spf1 include:_spf.example.net ip4:203.0.113.25 -all
  1. Leave TTL on Auto. In Bridge DNS that's 120 seconds for TXT records, so you can correct a mistake quickly.
  2. Save. The record is live on our nameservers within seconds.

That's the full SPF record setup on the DNS side. Mail providers sometimes show a "verify" button. Press it only after the record is published, or it will report a failure that's already fixed.

What goes into the policy

An SPF record example breaks down into three parts:

Part Example Meaning
Version v=spf1 Marks the TXT string as SPF. It must come first.
Mechanisms include:_spf.example.net, ip4:203.0.113.25, ip6:2001:db8::25, mx, a Sources allowed to send
Verdict -all or ~all What happens to everyone else

A dash before all means fail: mail from unlisted sources should be rejected. A tilde means softfail: accept but treat it as suspicious. With DMARC enforcing your policy, either works. Many teams start with ~all while they discover senders, then switch to -all.

Fix multiple SPF records

Two TXT records starting with v=spf1 on the same name don't add up. Receivers return a permanent error (permerror), and SPF fails for every message. This is the most common SPF problem we see, usually after a second service told someone how to add an SPF record and they did exactly that.

The fix is to merge them:

Before:  v=spf1 include:_spf.example.net -all
         v=spf1 include:mail.example.org ~all
After:   v=spf1 include:_spf.example.net include:mail.example.org -all

Keep one v=spf1 at the start and one all at the end, then delete the second record.

How to verify an SPF record

Two checks verify SPF record changes end to end: DNS first, then a real message.

dig example.com TXT +short

You should see exactly one string beginning with v=spf1. Next, send a message to an external mailbox and open the full headers. Look for Authentication-Results with spf=pass and the sending IP. A spf=softfail or spf=fail names the IP that wasn't covered, which tells you which service is missing from the list.

The return-path matters here: SPF checks the domain in the envelope sender, not the From line. If a service uses its own bounce domain, SPF passes for their domain. DMARC then needs DKIM to align with yours. See how to add and verify a DKIM record.

Why SPF fails

Symptom Likely cause Fix
permerror Two SPF records, or a syntax error Merge into one, check spelling of mechanisms
permerror: too many DNS lookups More than 10 DNS lookups while evaluating Remove unused includes, replace a/mx with ip4 ranges
softfail or fail for one service That sender isn't listed Add its include: or IP range
none No SPF record found Check the record name is @, not the full domain twice
Intermittent temperror Slow or failing lookups in an include Usually the include owner's problem; retry later

The 10 DNS lookups limit counts include, a, mx, ptr, exists and redirect, including those nested inside includes. ip4 and ip6 cost nothing. RFC 7208 also limits void lookups, which are lookups that return nothing, to two. An include pointing at a retired service can push you over.

How to roll back

You can restore an earlier policy, but receivers may still have the changed value cached. Keep a copy of the old value before editing. If mail starts failing, paste the old value back. With a 120-second TTL, receivers pick up the restored record within a couple of minutes. Avoid deleting the policy entirely as a "fix": no record gives spf=none, and DMARC will lean entirely on DKIM.

SPF setup FAQ

How do I check my SPF record?

Run dig example.com TXT +short and look for one string starting with v=spf1. Then send a test message and read the Authentication-Results header for spf=pass. If it fails, the header names the IP that wasn't allowed.

Can I have multiple SPF records?

No. One domain name may have only one SPF record. Two v=spf1 TXT records cause a permanent error and SPF fails for all mail. Merge their mechanisms into a single record.

Should I use -all or ~all?

Use -all once you're sure every sender is listed. Use ~all while you're still discovering senders. With a DMARC policy in place, receivers follow DMARC either way, so the difference is smaller than it looks.

How to add SPF record data: TXT or SPF type?

Always TXT. The separate SPF record type (99) was dropped by RFC 7208 and shouldn't be used, even where an editor still offers it.

How to add SPF record entries for a subdomain?

Create a separate TXT record named after the subdomain, such as news, with its own v=spf1 policy. The check runs on the exact domain in the envelope sender, so news.example.com doesn't inherit the parent's policy.

Once SPF passes, finish authentication with a DMARC policy. For the full picture, return to email DNS records. TXT syntax limits are in the TXT record reference.