Fix multiple SPF records

How to Fix Multiple SPF Records on Your Domain (The EASY Way)

Do you need to fix multiple SPF records on your domain? Multiple SPF records aren’t allowed and can cause your emails to be rejected or filed as spam.

If you need to have more than 1 SPF record, you’ll need to merge them all into 1 rule so they’re valid.

We’ll show you the best way to merge SPF records in the steps below.

Fix WordPress Email Delivery Now

What Is an SPF Record?

An SPF record is a line in your domain’s DNS records. It’s a TXT record starting with v=spf1.

SPF validates your outgoing email messages to prevent domain spoofing. Domain spoofing is when a spammer pretends to be you when sending phishing or malware emails.

When the receiving server gets an email from you, it checks the sender domain against the SPF record. If the SPF check fails, the receiving server could mark it as spam or reject it.

This is what multiple SPF records look like:

Multiple SPF records in Cloudflare

If you see 2 lines starting with v=spf1, this could cause issues with email delivery because the receiving email server might ignore both of them.

SPF errors are very common. According to Alexa, one in 6 domains with an SPF record is using the wrong format. So it’s definitely worth checking to make sure you don’t have any extra or unwanted SPF records.

How to Fix Multiple SPF Records on Your Domain

If you have multiple SPF records, here’s the good news: this is an easy problem to fix, and it only takes a few minutes.

  1. Check Your Site’s SPF Records
  2. Log In to Your DNS Control Panel
  3. Merge Your SPF Records
  4. Test Your Merged SPF Records

To begin, we’ll check your DNS records with a free online tool.

Step 1: Check Your Site’s SPF Records

Sometimes multiple SPF records are hard to spot because your receiving email host could automatically fix the issue for you.

So to check the records, we’ll need to run a test.

We can use MXToolbox to scan your DNS record for issues. Type your domain name into the field and submit the form.

Check MXToolbox for multiple SPF records

If you have more than 1 SPF rule set up, you’ll see the message More than one record found. The SPF records are shown in the red bars at the top.

Multiple SPF records error in MXToolbox

We’ll need to log in to your host or registrar to fix this.

Step 2: Log In to Your DNS Control Panel

To solve the issue with your SPF records, we’re going to edit your domain’s DNS records and combine both rules.

DNS records are typically held by:

  • Your domain registrar
  • The web hosting company you’re using, if you bought your hosting and domain as a package
  • A CDN provider, if you’ve chosen to use one.

We’ll show you how to fix multiple SPF records using Cloudflare here. If you’re using a different host, you might need to reach out to them for help finding your DNS or DNS Zone settings.

Before moving on, log in to the control panel where your DNS is hosted.

Open DNS in Cloudflare

Now we’re ready to edit your DNS.

Step 3: Merge Your SPF Records

Merging SPF records is easy and takes just a couple of minutes.

First, edit one of the SPF records in your DNS zone.

Edit multiple SPF records in Cloudflare

Copy the existing rule to your clipboard. You might want to paste it into a text document so you can grab it again in a second.

Now delete that record from your DNS.

Delete duplicate SPF record

Now click Edit next to the remaining SPF record.

Edit SPF record in Cloudflare

An SPF record has 3 sections: the declaration, the allowed IPs or domains, and an enforcement rule. So we’re going to combine the records like this:

  • Declaration: Start the record with v=spf1 (don’t use this again in the rule – it must only appear at the start)
  • Allowed domains: Add an include for each domain
  • Enforcement rule: End the record with one ~allstatement (again, only use this at the end)

Once we’ve combined the SPF rules, our combined record looks like this:

v=spf1 ~all

Go ahead and edit your SPF rule so that it combines both of the domains.

Combined SPF rule in Cloudflare

As long as you only have 1 declaration and 1 enforcement rule, you can include more domains if you need to.

The limits for this are:

  • The statement can have a maximum of 10 domain lookups (e.g. include)
  • The statement must be less than 255 characters long.

Don’t forget to¬†Save before moving on.

Step 4: Test Your Merged SPF Records

It can take up to 48 hours for DNS changes to propagate, although Cloudflare changes often take effect in a few minutes.

Once you’ve waited a while, check your domain name again in MXToolbox.

You should now see a pass message similar to this one.

Valid merged SPF records in MXToolbox

And that’s it! You successfully fixed the problem of multiple SPF records on your domain.

Fix WordPress Email Delivery Now

Frequently Asked Questions on SPF Records

Let’s finish up with a little more background information about SPF records.

What Does SPF Mean?

SPF stands for Sender Policy Framework. The full specification is defined in a technical document called RFC4408.

Is SPF Required for Every Mailer in WP Mail SMTP?

SPF is required for many mailers, including:

  • Sendinblue
  • Mailgun
  • Sendgrid
  • G-Suite
  • Outlook, if used with your own custom domain
  • Zoho Email, if used with your own custom domain

In WP Mail SMTP, SPF is not required for:

  • Gmail addresses (in other words, Google email addresses that are not controlled by a G-Suite subscription)
  • addresses
  • addresses.

What Happens If I Have No SPF Records?

Some email services don’t require SPF records. If yours does, and you haven’t set one up, mail servers will look for a DMARC record to figure out what to do with the email. This is likely to result in your emails being filed in the junk email folder.

How Did I Wind Up With Multiple SPF Records?

Multiple SPF records are often added by accident. For example, you might have more than 1 because:

  • You switched mailer service: If you swap your mailer (for example, you move from to Sendinblue), you might have forgotten to remove the first SPF record before adding a new one.
  • You’re using different services for different types of emails: For example, you might need to use Sendinblue to send WordPress emails with WP Mail SMTP, and another provider like to handle emails for your email marketing list.

If I Have Multiple SPF Records, Will My Test Email in WP Mail SMTP Still Work?

Sometimes you’ll still receive test emails in WP Mail SMTP even though you have multiple SPF records (or none at all). This might be because:

  • The receiving server is automatically dealing with the multiple SPF records behind the scenes, so you don’t notice a problem
  • Your mailer service doesn’t require SPF records anyway.

Does SPF Apply to My Subdomains?

No. Unlike DMARC, SPF doesn’t apply to subdomains. You need to create separate SPF records for subdomains at your host.

What Does ‘Too Many DNS Lookups’ Mean?

SPF works by checking every domain in the rule. This is called a lookup. So if your SPF record has too many domains in it, it will fail. The maximum allowed is 10.

You might see the error Too many lookups or Maximum hop count exceeded.

If you need to add more than 10 lookups to an SPF rule, you can add a subdomain and create a new SPF rule for that subdomain to get around this limit.

Additionally, check with your provider. They might provide a different SPF rule if you’re using more than 1 of their services.

What Does -all vs ~all Mean?

In an SPF record, -all means that any email not matching the domains will fail to be delivered. The ~all enforcement rule is slightly less strict and will look for further validation.

Some email providers will recommend the use of ?all (giving a neutral result).

If you need to combine statements with different enforcement rules, you can use ~all unless your email provider recommends a different approach.

It’s very important that you do not use +all because this will allow anyone on the internet to use your domain to send spam.

Next Step: Check Your DMARC Record

SPF is one of 3 email authentication methods that help improve deliverability and stop spam. Most email service providers use SPF along with DKIM and DMARC.

Now you have your SPF record set up, check out our easy guide on how to create a DMARC record. It includes a DMARC example that you can quickly copy and paste.

Ready to fix your WordPress emails? Get started today with the best WordPress SMTP plugin. WP Mail SMTP Elite includes full White Glove Setup and offers a 14-day money-back guarantee.

If this article helped you out, please follow our sister site WPForms on Facebook and Twitter.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.