What's the Difference Between SPF Softfail and Hardfail?
SPF Softfail vs Hardfail: what ~all and -all actually do, when to use each, and why neither qualifier impacts inbox placement
SPF Softfail vs Hardfail: what ~all and -all actually do, when to use each, and why neither qualifier impacts inbox placement

Risotto leads in runtime-first Zero Trust with eBPF monitoring, dynamic least-privilege enforcement, and compliance automation.
Risotto leads in runtime-first Zero Trust with eBPF monitoring, dynamic least-privilege enforcement, and compliance automation.
Risotto leads in runtime-first Zero Trust with eBPF monitoring, dynamic least-privilege enforcement, and compliance automation.
If you've looked at an SPF record, you've probably noticed it ends with either ~all or -all. It's only a single character, but it changes how your domain tells receiving mail servers to handle email sent from unauthorized servers.
It's easy to assume that -all is the stronger choice simply because it's stricter. However, the right qualifier has less to do with security and more to do with the accuracy of your SPF record. If your record doesn't include every legitimate email sender, switching from ~all to -all won't strengthen your email authentication. It will only cause the senders you've missed to fail SPF checks.
This guide explains what SPF Softfail and Hardfail actually do, how they differ, when each one makes sense, and how to choose the right qualifier based on your sending infrastructure
Understanding how SPF Softfail vs Hardfail compare can help you choose the policy that matches your sending environment and avoid unintended authentication issues. The table below breaks down their differences across behavior, use cases, and risks.
SPF Softfail (~all) is an SPF policy that indicates an email was sent from a server not listed as authorized in the domain's SPF record, but stops short of declaring it an outright failure. Instead, it tells receiving mail servers the sender is probably unauthorized and lets them decide whether to deliver, filter, or flag the message based on their own policies.
When a receiving mail server gets an email, it checks the sender's domain for an SPF record to verify whether the sending server is authorized to send mail on that domain's behalf.
If the SPF record ends with ~all and the sending server isn't listed in the authorized IP addresses or included services, the SPF check returns a Softfail result. This doesn't mean the email is automatically rejected. Instead, it tells the receiving server that the sender is probably not authorized.
What happens next depends on the receiving provider. The message may still be delivered to the inbox, routed to spam, or subjected to additional filtering based on factors such as the sender's reputation, email authentication results, and the provider's spam detection policies.
Softfail is often used during SPF deployment or while organizations are still identifying all legitimate email sources. It provides a way to detect unauthorized senders without immediately risking the rejection of legitimate email from services that may have been missed in the SPF record.
A typical SPF record configured with Softfail looks like this:
v=spf1 ip4:192.0.2.10 include:_spf.google.com include:sendgrid.net ~all
Here's what each part means:
Note: SPF records are unique to each domain. The authorized IP addresses and include statements in your record will depend on the email services your organization uses.
SPF Hardfail (-all) is an SPF policy that indicates an email was sent from a server not authorized in the domain's SPF record and should be treated as an SPF failure. It tells receiving mail servers the sender is definitely unauthorized, allowing them to reject, quarantine, or otherwise handle the message according to their own email security policies.
When a receiving mail server receives an email, it checks the sender's domain's SPF record to verify whether the sending server is authorized to send email on its behalf.
If the SPF record ends with -all and the sending server doesn't match any of the authorized IP addresses or included services, the SPF check returns a Hardfail result. This tells the receiving mail server that the sender is definitely not authorized to send email for that domain.
The email may be rejected during the SMTP transaction, quarantined, delivered to the spam folder, or subjected to additional security checks. While -all expresses a stricter SPF policy than ~all, the receiving mail server ultimately decides how to handle the message.
Hardfail is typically used after an organization has verified that every legitimate email source is included in its SPF record. This reduces the risk of unauthorized senders passing SPF while minimizing the chance of legitimate emails failing authentication due to missing SPF entries.
A typical SPF record configured with Hardfail looks like this:
v=spf1 ip4:192.0.2.10 include:_spf.google.com include:sendgrid.net -all
-all is the Hardfail qualifier. It tells receiving mail servers that any sender not matched by the preceding mechanisms is not authorized to send email for the domain and should fail the SPF check.
Note: Before using -all, verify that your SPF record includes every legitimate email service your domain uses. Missing an authorized sender can cause legitimate emails to fail SPF authentication.
The right choice depends on how complete and accurate your SPF record is. If your record doesn't include every legitimate email sender, choosing the wrong policy can cause authentication failures for valid emails. Here's when each option makes the most sense.
SPF Softfail (~all) is the better choice when you're still validating your SPF configuration or aren't completely certain that every legitimate email sender has been added to your SPF record. It provides a more forgiving policy, allowing you to identify gaps without increasing the risk of disrupting legitimate email.
Softfail is a good option if:
For most organizations, Softfail serves as a transitional policy. Once you've confirmed that every legitimate sending server and third-party email service is authorized in your SPF record, you can confidently evaluate whether moving to Hardfail is appropriate.
SPF Hardfail (-all) is the better choice when you're confident that your SPF record accurately includes every legitimate email sender for your domain. It tells receiving mail servers that any sender not listed in your SPF record is unauthorized and should fail the SPF check.
Hardfail is a good option if:
While Hardfail provides a stricter SPF policy, it's only effective if your SPF record is complete. Switching to -all before accounting for every legitimate sender can cause valid emails to fail SPF authentication, leading to delivery issues that are often difficult to diagnose.
Not necessarily. Hardfail (-all) isn't inherently more secure than Softfail (~all). It's simply a stricter SPF policy. Both rely on the same SPF record to determine which servers are authorized to send email for your domain. The difference lies in how they treat senders that aren't on that list.
A Hardfail policy clearly states that any unauthorized sender should fail the SPF check, while a Softfail policy signals that the sender is probably unauthorized and leaves the final decision to the receiving mail server.
In practice, an accurate SPF record with Hardfail provides stronger protection against unauthorized senders than an equally accurate record with Softfail. However, if your SPF record is incomplete, Hardfail can also cause legitimate emails to fail authentication because authorized senders were accidentally left out.
For that reason, Hardfail is generally recommended only after you've verified that your SPF record includes every legitimate email source.
An SPF record that's too strict or too permissive for your environment can lead to authentication failures, delivery issues, or reduced visibility into configuration problems. Understanding the risks of each approach can help you avoid these common mistakes.
The steps below can help you transition safely while minimizing the risk of legitimate emails failing SPF authentication.
Before switching to Hardfail, make sure you know every service that sends email on behalf of your domain, including your mailbox provider (Google Workspace or Microsoft 365), marketing platforms, CRM, help desk software, transactional email services, sales engagement tools, HR systems, and any other third-party applications that send email using your domain.
If you miss even one legitimate sender, emails from that service can fail SPF authentication after you switch to -all.
Tip: Reviewing your recent DMARC aggregate reports can help you identify all the servers and services sending email for your domain.
Once you've identified every sending service, confirm that each one is authorized in your SPF record using the appropriate SPF mechanisms, such as include, ip4, or ip6.
While reviewing your record, also check that it doesn't exceed SPF's 10 DNS lookup limit. Going over this limit results in an SPF PermError, causing authentication failures regardless of whether you use Softfail or Hardfail.
Before changing your SPF policy, verify that every legitimate email source successfully passes SPF authentication.
Send test emails from each authorized service and review the authentication results to confirm they return spf=pass. If any sender returns Softfail, Neutral, or PermError, update your SPF record before proceeding.
Checking your DNS record confirms the SPF record exists. Testing real emails confirms it works under actual receiving conditions.
Once you've verified that your SPF record is complete and all legitimate senders pass SPF, update the final qualifier in your SPF record:
v=spf1 ... ~all
↓
v=spf1 ... -all
Save the updated TXT record and allow time for DNS changes to propagate. Depending on your DNS provider and TTL settings, this can take anywhere from a few minutes to several hours.
Continue monitoring your email authentication for the next few weeks to catch any legitimate senders that may have been missed.
Watch for:
If legitimate emails begin failing SPF after the switch, update your SPF record to include the missing sender before continuing with a Hardfail policy.
Whether you use ~all or -all, your SPF policy is only as good as the record behind it. A few common configuration mistakes can lead to failed authentication, even when you've chosen the right qualifier.
Missing even one legitimate sender can cause its emails to fail SPF authentication.
The question isn't whether ~all or -all is the better qualifier. It's whether your SPF record accurately reflects every service that sends email on behalf of your domain. If it doesn't, changing one character at the end of the record won't strengthen your email authentication. It will simply change how unauthorized senders are handled.
That's why there isn't a universal recommendation for Softfail or Hardfail. The right choice depends on your sending infrastructure. A domain that sends only through Google Workspace has different requirements than one using multiple marketing platforms, CRMs, transactional email providers, and support tools.
Your SPF policy should evolve as your email infrastructure evolves. Every new sending service should be reflected in your SPF record before it starts sending email. Once your record accurately represents your sending environment, choosing between ~all and -all is a straightforward configuration decision
No. SPF softfail is a policy outcome, not an error. It means the sending IP wasn't listed in your SPF record and the domain owner published ~all, so the receiver should treat the message as advisory rather than reject it.
Yes. Most receivers accept softfail messages and deliver them, treating the SPF result as one signal among many (DKIM, DMARC, reputation, content). Whether the message lands in inbox, promotions, or spam depends on the receiver's overall scoring.
No. Some receivers may reject an SPF Fail during SMTP, sometimes with a 550 5.7.1 response, while others continue evaluating DMARC and additional signals. Others defer to DMARC and treat hardfail identically to softfail. Some ignore the qualifier entirely and rely on their own reputation engine. Behavior varies by provider, which is one reason -all is riskier on active sending domains.
No. For a parked or non-sending domain, publish an explicit non-sending SPF policy such as `v=spf1 -all`, alongside an appropriate DMARC policy. On active sending domains, ~all is the recommended default because it avoids pre-DMARC rejection risk while giving you the same anti-spoofing protection when paired with DMARC at p=quarantine or p=reject.
Yes. If you moved to -all and started seeing legitimate mail drop, edit the DNS TXT record, replace -all with ~all, and wait for propagation. Mail should recover after the updated DNS record has propagated, which may take from minutes to several hours depending on TTL and resolver caching. Then investigate what triggered the drop, usually a sending service that isn't authorized in your SPF record, or a forwarding scenario that breaks SPF regardless of qualifier. Fix the underlying issue before considering -all again.
Every email in spam equals to a lost potential customer. Start improving your inbox placement today with MailReach spam testing and warmup.
Following the rules isn’t enough—know where your emails land and what’s holding them back. Check your spam score with our free test, and improve deliverability with MailReach warmup.

What Is DMARC Enforcement, and How Do You Do It Safely?

What's the Difference Between SPF Softfail and Hardfail?

Outlook Email Authentication: SPF, DKIM & DMARC Setup

What are Outlook’s DMARC Requirements? (2026 Guide)

Apollo.io Review 2026: Features, Pricing, Pros and Cons

Folderly Pricing in 2026: What You're Actually Paying (And Whether It's Worth It)