Blog
How to Fix SPF Record Failures

How to Fix SPF Record Failures

Published on: Oct 31, 2026
•
5 min read
Summarize with

You’ve added an SPF record to your domain, but your emails are still failing authentication. So, what went wrong?

It could be something as simple as a missing sending IP, two SPF records published for the same domain, or a small mistake in the record's format.

Your SPF record might also exceed the limit of 10 DNS lookups, which can cause authentication to fail.

The first step is to find out exactly what's wrong with your record.

In this guide, I'll show you how to fix SPF record failures, correct common DNS errors, and test your SPF record to make sure your emails pass authentication.

Table of Contents

SPF Record Failures at a Glance

SPF Error Cause Fix
Syntax error Invalid SPF format Correct the syntax
Multiple SPF records Duplicate SPF policies Merge into one record
Too many DNS lookups Exceeds the 10-lookup limit Reduce unnecessary lookups
SPF fail or softfail Sending IP isn't authorized Authorize the sender
SPF PermError Invalid record or lookup limit exceeded Correct the underlying error
SPF TempError Temporary DNS failure Check DNS and retry
SPF record not found Missing SPF policy Publish at the correct DNS name
SPF forwarding failure Forwarding changes the sending IP Use SRS; check aligned DKIM for DMARC

How to Check If Your SPF Record Is Failing

Before changing your SPF record, you need to find out what's causing the failure. Your DNS record might look correct, but the server sending your emails may not be authorized. Here are three ways to check.

1. Check Your SPF Record Using MXToolbox

Check Your SPF Record Using MXToolbox
This image shows to Check Your SPF Record Using MXToolbox

MXToolbox helps you find problems with your SPF record, including syntax errors, duplicate records, and DNS lookup issues.

  1. Open the MXToolbox SPF Record Lookup.
    ‍
  2. Enter your domain name, such as example.com.
    ‍
  3. Run the SPF lookup.
    ‍
  4. Check the results for errors and warnings.

Pay attention to SPF PermError and the 10 DNS lookup limit. Exceeding this limit causes SPF to return permerror. If the tool reports an error, check what caused it before making changes to your DNS.

2. Find SPF Errors in Email Headers

An SPF checker can tell you if your record has configuration problems. But to know whether your actual emails pass SPF, you need to check their headers.

In Gmail:

  1. Send a test email from your sending mailbox to a Gmail account.
    ‍
  2. Open the received email.
    ‍
  3. Click the three-dot menu and select Show original.
    ‍
  4. Find the SPF result in the authentication details.

Look for:

spf=pass

This means the sending IP is authorized by the SPF policy of the domain being checked. If you see spf=fail, spf=softfail, or spf=permerror, the email hasn't passed SPF.

Also, check the smtp.mailfrom domain in the authentication results. SPF usually checks this domain, which may differ from the email address recipients see in the From field.

3. Check Your SPF TXT Record in DNS

You can also check your SPF record directly in your domain's DNS settings.

  1. Log in to your DNS provider, such as Cloudflare or GoDaddy.
    ‍
  2. Open the DNS management section.
    ‍
  3. Find the TXT records for the domain being checked.
    ‍
  4. Look for a record starting with v=spf1.

For example, if Google Workspace is the only service sending email using your domain for SPF, your record might look like this:

v=spf1 include:_spf.google.com ~all

Check these four things:

  • You have only one SPF record for the same DNS name.
    ‍
  • Your record starts with v=spf1.
    ‍
  • The record authorizes the correct sending IPs or services.
    ‍
  • SPF evaluation stays within the 10 DNS lookup limit.

If the record appears correctly in your DNS dashboard but an external checker cannot find it, check whether it's published under the correct hostname. Recent DNS changes may also still be cached.

Once you've identified the error, you can fix the specific problem without changing parts of your SPF record that are already working.

How to Fix Common SPF Record Failures

Once you know why your SPF record is failing, you can fix the problem in your DNS settings. Here are seven common SPF errors and how to fix each one.

1. Fix SPF Record Syntax Errors

A small formatting mistake can make your SPF record invalid. This could be an incorrect IP address, a missing colon, or an unsupported SPF mechanism. For example, this record has an incorrectly formatted include mechanism:

Incorrect: v=spf1 include_spf.google.com ~all
Correct: v=spf1 include:_spf.google.com ~all

To fix syntax errors:

  1. Open your SPF TXT record in your DNS settings.
    ‍
  2. Make sure it starts with v=spf1.
    ‍
  3. Check that mechanisms such as include:, ip4:, and ip6: are written correctly.
    ‍
  4. Remove invalid entries and save the corrected record.
    ‍
  5. Run the updated record through an SPF checker.

Don't replace the entire record with an example you found online. You could accidentally remove a sending service that your domain still uses.

2. Fix Multiple SPF Records

If your domain has two or more SPF records at the same DNS name, SPF returns permerror. This happens because receiving servers cannot evaluate multiple SPF policies published for the same name.

To fix this, you need to combine the authorized sending services into one SPF record instead of keeping separate records.

For example, suppose you use Google Workspace and another email server.

Incorrect - two separate SPF records

Record 1: v=spf1 include:_spf.google.com ~all
Record 2: v=spf1 ip4:192.0.2.10 ~all

Correct - one combined SPF record

v=spf1 include:_spf.google.com ip4:192.0.2.10 ~all

Here's how to fix it:

  1. Open your domain's DNS settings and find all TXT records starting with v=spf1 at the affected DNS name.
    ‍
  2. Check which sending services and IP addresses you still use.
    ‍
  3. Combine their authorization mechanisms into a single SPF record.
    ‍
  4. Remove the extra SPF records and save your changes.
    ‍
  5. Run an SPF lookup to confirm that only one SPF record remains and that it has no syntax or lookup-limit errors.

Important: Don't delete unrelated TXT records, such as DKIM records or domain verification records. Only the duplicate SPF policies need to be combined.

3. Fix the SPF 10 DNS Lookup Limit

Chart showing an SPF record reaching 11 of 10 allowed DNS lookups and returning permerror
This image shows the Chart showing an SPF record reaching 11 of 10 allowed DNS lookups and returning permerror

SPF allows a maximum of 10 DNS-lookup-causing mechanisms and modifiers during evaluation. This includes include, a, mx, exists, redirect, and lookups triggered by nested SPF records. If SPF evaluation exceeds this limit, it returns permerror.

To reduce SPF lookups:

  1. Run your domain through an SPF checker that shows the lookup count.
    ‍
  2. Review the include mechanisms and any nested SPF records.
    ‍
  3. Remove authorizations for services you no longer use.
    ‍
  4. Check whether the same sending service is included more than once.
    ‍
  5. Use direct ip4: or ip6: mechanisms for sending IPs you control, where appropriate.
    ‍
  6. Test the updated record to confirm it stays within the limit.

For example:

v=spf1 include:_spf.google.com ip4:192.0.2.10 ~all

The ip4: mechanism doesn't count toward the 10-lookup limit.

You may also come across SPF flattening, which replaces DNS-based mechanisms with IP addresses. This can reduce lookups, but those IP addresses can become outdated when a provider changes its sending infrastructure.

Only use flattening if you have a way to keep the IP list updated.

4. Fix Missing or Unauthorized Sending IPs

If the sending IP isn't authorized by the SPF policy being checked, SPF can return fail or softfail, depending on how that policy is written. It can also return neutral if the policy uses ?all.

For example, your domain might authorize Google Workspace, but an additional sending server uses a different IP.

Before:

‍v=spf1 include:_spf.google.com ~all

After:

‍v=spf1 include:_spf.google.com ip4:192.0.2.10 ~all

In this example, 192.0.2.10 represents an additional authorized sending server. To fix the problem:

  1. Check the failed email's headers to find the sending IP and smtp.mailfrom domain.
    ‍
  2. Confirm which server or email service sent the message.
    ‍
  3. Check whether that IP is already authorized by the SPF policy for the domain being evaluated.
    ‍
  4. If it isn't, add the correct IP or the provider's recommended SPF mechanism to that domain's record.
    ‍
  5. Send another test email and check the SPF result.

Don't add an IP address just because it appears in an email header. Confirm that it belongs to a service authorized to send your emails.

5. Fix SPF PermError and TempError

These SPF results tell you whether the problem is permanent or temporary.

SPF Result Common Cause Fix
permerror Invalid SPF syntax, duplicate SPF records, or excessive DNS lookups Correct the underlying SPF error
temperror Temporary DNS resolution problem Check DNS availability and retry

For permerror: Run an SPF lookup and correct the reported problem. The fixes for syntax, duplicate records, and DNS lookup limits are covered above.

For temperror: Check whether the DNS servers for the SPF domain are responding. If DNS is temporarily unavailable, retry the check after the issue is resolved.

A temporary DNS failure doesn't necessarily mean your SPF record needs editing.

6. Fix Missing or Incorrect SPF Records

If the receiving server cannot find an applicable SPF policy, the result may be none. The SPF record might be missing or published under the wrong hostname. Also, SPF may be checking a different domain from the one you expected, especially when a third-party email service handles the envelope sender.

How to fix it:

  1. Check the smtp.mailfrom domain in the failed email's headers.
    ‍
  2. Look up the SPF TXT record for that domain.
    ‍
  3. If it's missing, get the correct SPF value from your email provider.
    ‍
  4. Publish it at the correct DNS name.
    ‍
  5. Verify that the record is publicly available.

For example, if Google Workspace is your only sending service for that SPF domain, you can use: v=spf1 include:_spf.google.com ~all

If an SPF record already exists, update that record instead of publishing a second one.

7. Fix SPF Failures Caused by Email Forwarding

Forwarding without SRS causes SPF fail
This image shows the Forwarding without SRS causes SPF fail

Alt text: Forwarding without SRS causes SPF fail

Email forwarding can break SPF because the forwarded message reaches the recipient from a different server's IP address. That IP may not be authorized by the original sender's SPF policy, even if the email passed SPF before forwarding.

How to address it:

  1. Check the forwarded email's headers to confirm where SPF failed.
    ‍
  2. If you manage the forwarding server, enable Sender Rewriting Scheme (SRS) where supported.
    ‍
  3. Check that the original message has a valid DKIM signature that survives forwarding.
    ‍
  4. Send another forwarded test email and review its SPF, DKIM, and DMARC results.

SRS rewrites the envelope sender so the forwarded email can pass SPF using the forwarding service's domain.

Important: DKIM doesn't fix SPF. However, a valid DKIM signature aligned with the visible From domain can allow DMARC to pass even when SPF fails after forwarding.

Steps to Update Your SPF Record in DNS

After identifying and correcting the SPF error, you need to update the TXT record in your domain's DNS settings. The steps are similar across DNS providers such as Cloudflare and GoDaddy.

Step 1. Log In to Your DNS Provider

Open the dashboard of the provider managing your domain's DNS records.

  1. Sign in to your DNS provider.
    ‍
  2. Select the domain you want to update.
    ‍
  3. Open the DNS Management or DNS Records section.

Make sure you're using the provider that manages your active DNS records. It may be different from where you purchased your domain.

Step 2. Locate Your Existing SPF TXT Record

Find the TXT record that starts with v=spf1.

For example:

v=spf1 include:_spf.google.com ~all

Check the Host or Name field to confirm you're editing the correct domain. For a root domain, many DNS providers use @.

Copy your existing SPF record before making changes so you have a backup. If you cannot find an SPF record, check the correct SPF domain before creating one.

Step 3. Edit the SPF Record and Save Changes

Open the existing SPF TXT record and make the required correction. For example, if you need to authorize an additional sending IP:

Before:

v=spf1 include:_spf.google.com ~all

After:

v=spf1 include:_spf.google.com ip4:192.0.2.10 ~all

Here, 192.0.2.10 is an example IP address. Replace it with the actual IP of your authorized sending server.

Before saving, check that:

  • Your SPF record starts with v=spf1.
    ‍
  • All required sending services are authorized.
    ‍
  • Only one SPF record exists at that DNS name.
    ‍
  • The record follows SPF syntax and lookup-limit rules.

Click Save or Update to publish the changes. If no SPF record exists, create a new TXT record at the correct DNS name using the SPF value required by your email provider.

Step 4. Verify That Your DNS Changes Are Published

After saving, check whether the updated SPF record is publicly available.

  1. Open the MXToolbox SPF Record Lookup.
    ‍
  2. Enter the SPF domain you updated.
    ‍
  3. Run the lookup.
    ‍
  4. Confirm that the new record appears and check for any remaining errors.

If the old record still appears, verify that you updated the correct DNS provider and hostname. Cached DNS results may take time to expire, depending on the record's TTL.

Once the new record is visible, send a test email and check its headers to confirm that SPF passes for the sending service you updated.

How to Prevent SPF Record Failures

SPF Maintenance checklist
This image shows the SPF Maintenance checklist

Your SPF record can work today and fail after you connect a new email tool or change your sending provider. The new server's IP may not be authorized, or an additional include mechanism could push the record over the 10 DNS lookup limit.

Here's what to check whenever your email setup changes.

What to Check What You Should Do
Adding a new email service Check which domain the service uses for SPF and add its required authorization to that domain's record.
Removing an email service Delete its SPF authorization once it no longer sends email for your domain.
DNS lookup count Check nested include mechanisms and keep SPF evaluation within the 10-lookup limit.
Multiple SPF records Edit the existing SPF record instead of creating another one at the same DNS name.
Sending IP changes Update the SPF record when an authorized sending server's IP changes.
SPF syntax Run an SPF lookup after editing the record to catch invalid mechanisms or formatting errors.
Actual SPF results Send a test email from each sending service and check spf=pass in the received message's headers.

An SPF checker can confirm that your record is valid, but it cannot prove that every sending service passes SPF. Test actual emails after changing providers, IP addresses, or SPF authorizations.

How Warmforge Helps You Monitor SPF Records and Email Deliverability

Fixing your SPF record tells you that one problem has been corrected. It doesn't tell you if another DNS record breaks later or if your emails are actually reaching inboxes.

Warmforge homepage
This image shows the Warmforge homepage

Warmforge gives you both checks. Its Health Checks monitor SPF, DKIM, DMARC, and MX records for your connected mailboxes. They also check blacklist status. So, if Warmforge's Health Checks detect a problem with your SPF or other DNS configuration, you can investigate the record and fix it through your DNS provider.

Health checks on Warmforge
This image shows the Health checks on Warmforge

Alt text: Health checks on Warmforge

Each mailbox also gets a Heat Score based on its DNS configuration, blacklist status, warmup progress, and recent warmup activity. Warmforge recommends a score of 85 or higher before you start sending campaigns.

Placement test on Warmforge
This image shows the Placement test on Warmforge

Alt text: Placement test on Warmforge

Then you can run a Placement Test to check what happens when you actually send. Warmforge sends your email to test addresses across different email providers and reports how many messages:

  • Reached the inbox
    ‍
  • Landed in spam
    ‍
  • Were not delivered

This gives you two different checks, Health Checks show whether SPF and the rest of your mailbox setup have problems, while Placement Tests show where your emails are landing.

Warmforge doesn't edit or repair your SPF record. If it flags an SPF problem, you make the change with your DNS provider and then use Warmforge to keep an eye on the mailbox afterward. You can start with one free warming slot and one free Placement Test in Warmforge.

Personalized Outbound Strategy

Get The Right Outbound Strategy In Minutes

Enter your email to get a custom plan & stack recommendation for your business

It's being carefully crafted by AI

Please check your mailbox in 5 minutes

Conclusion

If your SPF record is failing, don't replace it blindly. Find the exact problem first, whether it's an unauthorized sender, duplicate SPF records, invalid syntax, or too many DNS lookups, and fix that specific issue.

Once you've updated the record, verify that the change is live and send a test email to confirm SPF passes. That should be the final step every time you change your SPF setup.

But don't treat SPF as a one-time DNS task. Adding a new sending service or changing your email infrastructure can create problems again.

That's why Warmforge is a good next step after fixing your SPF record. It checks SPF alongside DKIM, DMARC, MX, and blacklist status, while Placement Tests show where your emails are actually landing.

Start with Warmforge to monitor your mailbox health and run a free Placement Test.

Keep emails out of spam

Warm up mailboxes and test inbox placement.
Try
free
4.6 rating on G2
Add as a preferred
source on Google