+254725682556 +254725052660 [email protected]
Client Area

Email

Can You Have Two SPF Records? How to Fix a Duplicate SPF TXT Record Error

A domain can only have one SPF TXT record. If you already have an SPF record set up for your business email and then add a second one, perhaps when connecting a marketing tool, a new email service, or a cPanel/DirectAdmin autoconfigured record, mail servers that check SPF will usually see two conflicting records and fail the check. This can cause your emails to land in spam or get rejected outright, even though each SPF record looks correct on its own.

Why You Can Only Have One SPF Record

The SPF standard expects a receiving mail server to find exactly one SPF TXT record for your domain. When it finds more than one, it cannot tell which one is authoritative, so most mail servers treat this as a permanent error and may fail every message from your domain, not just the ones sent through the new service you just added.

This is different from the "too many DNS lookups" SPF error. That happens when a single SPF record includes too many other domains. A duplicate SPF record is two separate TXT entries that each start with v=spf1.

How to Check If Your Domain Has a Duplicate SPF Record

Look up your domain's TXT records and check how many of them start with v=spf1. If you see two or more, that is the problem.

  1. Use an online DNS lookup tool, or the dig/nslookup method described in ZIPROF's guide on checking your domain's DNS records, to list all TXT records for your domain.
  2. Scan the results for any record beginning with v=spf1.
  3. If more than one shows up, note what each one authorizes (for example, one might list your previous host's mail servers and another might list a new email provider's servers).

How to Merge Two SPF Records Into One

The fix is to combine the contents of both records into a single SPF TXT record, then delete the extra one. You are not allowed to simply keep both.

For example, if one record reads v=spf1 include:_spf.firsthost.com ~all and another reads v=spf1 include:_spf.secondservice.com ~all, the merged record should read:

v=spf1 include:_spf.firsthost.com include:_spf.secondservice.com ~all

  • Keep v=spf1 only once, at the start.
  • Combine every include:, a, mx, or ip4/ip6 mechanism from both records into the one line.
  • Keep only one ending qualifier, either ~all (soft fail) or -all (hard fail), at the very end.
Combining two records can push you over the 10 DNS lookup limit for SPF. If that happens, you will need to also flatten or trim some of the include: entries, as covered in ZIPROF's guide on fixing SPF "too many DNS lookups" errors.

In cPanel

  1. Log in to cPanel and open Zone Editor under the Domains section.
  2. Find your domain and click Manage.
  3. Filter or scroll to find both TXT records that start with v=spf1.
  4. Click Edit on the first one, replace its value with the merged SPF record, and click Save Record.
  5. Click Delete on the second, now-redundant SPF TXT record.

In DirectAdmin

  1. Log in to DirectAdmin and open DNS Management (sometimes listed as DNS Administration) for your domain.
  2. Locate both TXT records that start with v=spf1.
  3. Edit the first record's value to the merged SPF record and save it.
  4. Delete the second SPF TXT record so only one remains.

After saving, give it some time for the change to take effect everywhere before testing, since DNS changes don't apply instantly worldwide. Then re-check your domain's TXT records, or use the SPF/DKIM/DMARC checker method described in ZIPROF's related guide, to confirm only one v=spf1 record remains and that it validates correctly.

For the basics of setting up SPF in the first place, see How to Set Up SPF and DKIM Records to Stop Your Emails Going to Spam.