No. A domain name can publish only one SPF record. If a receiver finds two or more TXT records starting with v=spf1 for the same hostname, RFC 7208 says the SPF check returns a permanent error (permerror), so no sender can pass. The fix is to merge every sender into a single record with one all mechanism at the end.
Key takeaways
- One hostname, one SPF record — two v=spf1 TXT records for the same name cause a permerror and SPF fails for every sender.
- Subdomains can each have their own record, and a long record split into several quoted strings is still one record.
- Merge all senders into one record, keep it within 10 DNS lookups, and verify the result with an SPF checker.
You add a new email tool, its setup guide tells you to add an SPF record, and your DNS already has one. So you add a second — and your deliverability quietly gets worse. This is one of the most common email authentication mistakes, and the fix is simple once you know the rule.
Can you have more than one SPF record?
No. A domain name can publish only one SPF record. RFC 7208, the standard that defines SPF, states in section 3.2 that a domain name must not have multiple records that would cause an authorization check to select more than one record.
SPF (Sender Policy Framework) is a DNS TXT record that lists which servers may send email for your domain. It starts with v=spf1 and lists your senders, for example v=spf1 include:_spf.google.com ~all. Receivers look it up when mail arrives and check whether the sending server is on the list.
The rule applies per hostname, not per domain. Your root domain gets one record, and each subdomain that sends mail gets its own single record. What you cannot do is publish two v=spf1 records for the same hostname.
If you are setting up email authentication for the first time, our guide to what DMARC is and how to set it up explains how SPF fits with DKIM and DMARC.
What happens when a domain has two SPF records?
The SPF check fails with a permanent error, called a permerror. The receiver does not pick one record, combine them, or try both — it stops and returns an error, so no sender can pass SPF for that domain.
RFC 7208 section 4.5 describes the receiver's job: it collects the TXT records that begin with v=spf1, and if the result is more than one record, the check produces a permerror. Section 2.6.7 defines a permerror as a failure that definitely requires the DNS operator to intervene.
The symptoms are inconsistent, which is why duplicates survive for so long. Some receivers reject the mail, some deliver it to spam, and some deliver it normally while DMARC fails in the background. Your mail may look fine in your own tests and still fail for a customer using a stricter receiver.
A duplicate also breaks DMARC. DMARC needs SPF or DKIM to pass in alignment with your domain, and a permerror means SPF cannot pass. If your DMARC policy is p=reject and DKIM is not aligned, legitimate mail can be rejected outright.
What counts as a second SPF record — and what does not?
Not everything that looks like a duplicate actually is one. A receiver counts only TXT records at one hostname that begin with exactly v=spf1, followed by a space or the end of the record. Everything else is ignored for this check.
| What is published | A second SPF record? | Why |
|---|---|---|
Two v=spf1 TXT records at one hostname | Yes | Both are selected, so the check returns a permerror |
One v=spf1 record plus other TXT records | No | DMARC, DKIM and verification records do not start with v=spf1 |
v=spf1 at example.com and at mail.example.com | No | Different hostnames, each with its own record |
| One record split into several quoted strings | No | Receivers join the strings; it is still one TXT record |
An include: pointing at another domain | No | The include is a reference, not a record on your domain |
| An old SPF-type (type 99) record | No | RFC 7208 removed the SPF record type; only TXT records count |
Two traps hide inside the table. First, a record split into several strings is valid only if the spaces stay inside the strings, because receivers join them without adding a space. Second, an include: can carry the problem in from outside: if the domain you include publishes two SPF records, that include returns a permerror too, even though your own DNS looks clean.
The old SPF record type (type 99) is a leftover from before RFC 7208. It is deprecated, and receivers ignore it. If you still have one, remove it and keep the v=spf1 TXT record.
How do I check how many SPF records my domain has?
Check from outside your DNS panel, because some panels hide the problem. A DNS panel may show two entries that look like one record, or one entry that is really two records, so query the live DNS instead.
- Use a checker. Run your domain through our free SPF checker. It lists every TXT record starting with
v=spf1and flags duplicates, lookup counts and syntax errors. - Or query DNS directly. On a Mac or Linux terminal, run
dig TXT example.comand count the answers that start withv=spf1. On Windows, usenslookup -type=TXT example.com. - Check each subdomain that sends mail. Repeat the query for
mail.example.comor any other sending subdomain, since each one is checked separately. - Check behind your includes. A good checker resolves every
include:and reports whether any of them is broken or duplicated.
Two lines starting with v=spf1 in the answer means two records. One line means one record, even if it is very long. Also check for stray characters: a record that starts with v=spf1 but has a typo in the version tag is ignored by receivers, which can look like a missing record rather than a duplicate.
How do I merge multiple SPF records into one?
Merging means building one record that lists every legitimate sender, then deleting the extras. Do it in a test window and keep a copy of both old records first, so you can roll back if mail starts failing.
- List what is published. Query your domain's TXT records and copy both
v=spf1records somewhere safe. - Drop senders you no longer use. A leftover record often lists a provider you left years ago. Every include you keep costs DNS lookups, so remove dead ones now.
- Write one record. Start with
v=spf1, add each sender's mechanism once, and end with a singleallmechanism. For example, Google Workspace and Microsoft 365 together look like this:v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all. - Count the lookups. Make sure the merged record stays within 10 DNS lookups, including nested includes (see the next section).
- Delete the extra record. Keep exactly one
v=spf1TXT record at that hostname. Saving the merged record does not help if the old one is still there. - Wait, then verify. DNS changes can take minutes to hours to propagate. Re-run the SPF checker and send test mail to a mailbox that shows authentication results.
Google Workspace's own setup guide gives the same pattern: one record per domain, with an include: for each sender. Its example for Google Workspace alone is v=spf1 include:_spf.google.com ~all, and for Google Workspace plus Microsoft 365 it adds include:spf.protection.outlook.com to the same record.
Never merge by concatenating the two records end to end. That gives you two v=spf1 tags and two all mechanisms in one string, which is invalid. Rebuild it as one clean record instead.
What is the 10 DNS lookup limit in SPF?
An SPF evaluation may use at most 10 terms that trigger DNS queries. RFC 7208 section 4.6.4 sets the limit, and exceeding it also returns a permerror — even if you have only one record and every sender is listed correctly.
The terms that count are include:, a, mx, ptr, exists: and redirect=. The count includes nested lookups: if you include a provider whose record includes three more domains, those count against your 10 as well. DNSimple's SPF reference lists the same limit and the mechanisms that trigger it.
Merging is where this bites. Each old record may have been under the limit on its own, but the merged record adds their lookups together. If you hit the limit, replace an include: with the provider's IP addresses using ip4: or ip6:, which need no DNS lookup, or drop a sender you no longer use.
Some providers publish a flattened include or a dedicated subdomain with fewer nested lookups. Ask your provider for its SPF guidance before you start replacing includes with raw IP addresses, since provider IPs can change without notice.
Should I end my SPF record with -all or ~all?
Use -all when you are confident the record lists every legitimate sender, and ~all while you are still testing. The difference is what receivers do with mail from servers that are not on your list.
-all(hard fail): servers not listed are not authorized. Receivers should treat their mail as failing SPF. This is the strongest setting and the right goal for most domains.~all(softfail): servers not listed are probably not authorized, but receivers should not reject the mail on SPF alone. Use this while you audit your senders, then move to-all.?all(neutral): you express no opinion about unlisted servers. It adds almost nothing, so there is rarely a reason to use it.+all: authorizes every server on the internet. Never use it — it makes your SPF record meaningless.
Whichever you choose, use exactly one all mechanism, at the end of the record. A merged record with two ~all endings is invalid, and some checkers flag it as a second problem on top of the duplicate.
Our guide to what DKIM is and how it works covers the second half of email authentication, which keeps working even when a forwarder breaks SPF.
What are the common mistakes that break SPF?
Duplicates are the headline mistake, but several smaller errors produce the same permerror or a silent fail. Check for these whenever SPF misbehaves.
- Adding a second record for a new tool. The most common cause. Every new sender belongs inside the existing record as an
include:orip4:, never as a new record. - Two records created by different teams. Marketing adds one for the newsletter tool while IT keeps the original. Keep one owner for DNS authentication records.
- Too many includes. Each marketing tool, CRM and helpdesk adds lookups. Audit the list twice a year and remove tools you stopped using.
- Missing subdomain records. Your root domain passes, but mail from a subdomain fails because the subdomain has no record of its own and does not inherit the parent's.
- Typos in the version tag.
v=spf1must be exact, followed by a space. A record starting withv=spforv=spf1xis ignored entirely. - Forwarding breaking SPF. A forwarder resends your mail from its own server, so SPF fails even with a perfect record. DKIM survives forwarding, which is one reason DMARC checks both.
If your mail goes to spam after a merge, check the message headers for spf= results before changing anything else. A spf=pass result means the record is fine and the problem is elsewhere, such as content, reputation or a missing DKIM signature.
The bottom line
You cannot have more than one SPF record per hostname. Two v=spf1 records do not give you two chances to pass — they guarantee a permerror, and SPF fails for every sender on that domain.
Merge everything into one record, keep it under 10 DNS lookups, end it with a single -all once you are sure, and verify the result. You can check your domain in seconds with the free SPF checker.
Frequently asked questions
Can you have more than one SPF record on a domain?
No. Each hostname can have only one SPF record, which is one TXT record beginning with v=spf1. If a receiver finds two or more, RFC 7208 requires it to return a permerror, and SPF fails for every sender on that domain.
Can a subdomain have its own SPF record?
Yes. SPF is checked per hostname, so example.com and mail.example.com can each publish their own single SPF record. A subdomain does not inherit its parent domain's SPF record, so give each sending subdomain its own record.
What happens if I have two SPF records?
The receiving server returns a permerror instead of a pass. Your mail is not automatically rejected everywhere, but SPF never passes, so spam filters and DMARC treat your mail with suspicion. Some receivers reject it, others send it to spam, and the behavior is inconsistent.
How do I merge two SPF records into one?
List every sender from both records, then write one TXT record starting with v=spf1, add each include, ip4, ip6, a or mx mechanism once, and end with a single all mechanism such as ~all or -all. Delete the extra record and check the result with an SPF checker.
Is a long SPF record split into several strings still one record?
Yes. A single TXT record can be split into several quoted character strings, and receivers join them back together. That is one record, not several, and it is the correct way to handle a record longer than 255 characters.
How many DNS lookups can an SPF record have?
At most 10 terms that trigger DNS queries, including include, a, mx, ptr, exists and redirect, counting nested includes too. Exceeding 10 also causes a permerror, so merging records can push you over the limit even when each old record was under it.
Should I use -all or ~all at the end of my SPF record?
Use -all once you are confident every legitimate sender is listed, because it tells receivers to fail mail from anyone else. Use ~all (softfail) while you are still testing or unsure, then move to -all. Never end a record with +all, which authorizes the whole internet.
Do I need SPF if I already have DKIM and DMARC?
Yes. SPF, DKIM and DMARC check different things: SPF checks the sending server, DKIM checks the message signature, and DMARC ties them together with a policy. DMARC needs at least one of SPF or DKIM to pass in alignment, so a broken SPF record weakens the whole setup.
Sources
- IETF — RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1
- Mimecast — Multiple SPF Records: Causes, Errors & Fixes
- DNSimple — SPF Record Syntax and Validation Reference
- YourDMARC — Multiple SPF Records: Why They Break
- boringutils — Can you have multiple SPF records?
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against RFC 7208 (sections 3.2, 4.5 and 4.6.4), Google Workspace SPF setup guidance and DNSimple's SPF reference.
How we write and fact-check →