Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Form notification fails SPF: how to find and fix it

DLV-006High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

SPF (Sender Policy Framework) is a DNS record on your domain that lists the servers allowed to send email as that domain. When a message arrives, the receiving mail server checks the sending server's IP against that list.

Many websites send form notifications straight from the web host, for example with the PHP mail() function. The From address is you@yourdomain.com, but the IP belongs to the host. If your SPF record only lists Google Workspace or Microsoft 365, the host is not authorised, and the result is fail or softfail.

Why it costs you leads or sales

The form works and the visitor sees a thank-you page, so nothing looks broken. But the notification to you or your sales team may go to spam, be quarantined, or be rejected outright. Leads sit unseen while the prospect talks to a competitor.

The risk is higher if your domain also has a DMARC policy, because a failing SPF with no aligned DKIM can lead to rejection. Business impact: high.

Where the lead is lost
  1. Visitor submits formThank-you page shows
  2. Site sends email from hostFrom: you@yourdomain.com, sent by host IP
  3. SPF checkHost IP not in your SPF record
  4. Inbox deliverySpam, quarantine or rejection
  5. Sales follow-upLead never seen

The form submits fine, but the notification fails SPF at the receiving server.

How to check if your site has it

Read the SPF result in a real notification
  1. Submit a test lead

    Fill in your own form with a test name and an email you control.

  2. Open the notification

    Find it in the inbox or spam folder. If it is missing, check spam and quarantine too.

  3. View the original headers

    In Gmail: open the message, then the three-dot menu, then Show original. It shows SPF: PASS or FAIL. In Outlook: File, Properties, Internet headers.

  4. Look for the SPF line

    Search for Received-SPF or Authentication-Results. A result of spf=fail, softfail or neutral means the sending server is not authorised.

  5. Compare the IP with your SPF record

    Note the sending IP in the header. Look up your record with dig TXT yourdomain.com or an online SPF checker and see whether that IP or the host's include is listed.

Example header showing the problemtext
Received-SPF: softfail (google.com: domain of transitioning you@yourdomain.com does not designate 203.0.113.25 as permitted sender)
Authentication-Results: mx.google.com; spf=softfail smtp.mailfrom=you@yourdomain.com

How to fix it

There are two routes. The better one is to stop sending from the host and send through a mail service that is built for it. The second is to authorise the host in SPF.

Send authenticated mail on your platform
  1. Install an SMTP plugin

    Use a plugin such as WP Mail SMTP or FluentSMTP and connect it to your mail provider (Google Workspace, Microsoft 365, or a transactional email service).

  2. Set the From address

    Use an address on your domain that the provider is allowed to send for, and enable the force-from option if the plugin offers it.

  3. Add the provider to SPF

    Add the provider's include to your SPF record, for example include:_spf.google.com for Google Workspace.

  4. Send a test

    Use the plugin's test email tool, then check the headers for spf=pass.

If you must keep sending from the host
  1. Ask your host for its SPF include

    Hosts publish an include value or the server IP in their documentation or support.

  2. Edit your existing SPF record

    Add the host's mechanism before the final ~all or -all.

  3. Publish and wait

    DNS changes can take from minutes to a few hours to be seen everywhere.

Example SPF TXT record (replace with your real values)text
v=spf1 include:_spf.google.com include:spf.your-host-example.com ~all
Host mail vs authenticated mail

Before

  • Sent by the web host's server
  • SPF result: softfail or fail
  • Notification in spam or rejected

After

  • Sent through an authorised mail service
  • SPF result: pass
  • Notification reaches the inbox

How to confirm it's fixed

Confirmation checks
  • Submit a fresh test lead through the live form
  • Open the original headers and see spf=pass
  • Check the domain in the SPF result matches your From domain
  • Confirm the message arrived in the inbox, not spam
  • Check your SPF record is still a single v=spf1 record
  • Test again from every form on the site

How to prevent it happening again

SPF breaks quietly when someone changes hosts, switches mail provider, or edits DNS. Keep a short list of every service that sends email as your domain, and update SPF whenever the list changes.

Habits that prevent a repeat
  • Keep a list of all senders for your domain
  • Never send form notifications with PHP mail() from the host
  • Re-test a lead after any hosting, DNS or plugin change
  • Review SPF and DMARC reports if you have them
  • Use a monitored test lead on a schedule

How FunnelGuard handles this

FunnelGuard detects this issue today. A robot visitor submits your real lead form on a schedule, and the test lead is checked as it arrives. The email authentication check reads the SPF result from the Authentication-Results or Received-SPF header of the notification.

If SPF fails, a failure is re-checked from a second region before one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. Test traffic is marked with utm_source=funnelguard and fg_test=1, so you can tell it apart from real leads. You can start on the Free plan (1 site, 2 journeys, daily checks, no card), or try a paid plan with a 3-day free trial.

Questions people ask

Why does my contact form email fail SPF?

Usually because the form sends mail as your domain from the web host's server, and your SPF record does not list that server. The receiving server sees an unauthorised sender and records spf=fail or softfail. Send through an authorised SMTP service or add the host to your SPF record.

How do I check the SPF result of a form notification?

Open the notification and view the original headers. In Gmail use Show original, in Outlook open File, Properties, Internet headers. Look for Received-SPF or spf= in Authentication-Results.

Will an SPF fail always send my form email to spam?

No, but it raises the risk. Some receivers only mark a softfail, while others junk or reject it, especially if your domain has a DMARC policy. Do not rely on luck for lead notifications.

How do I add my web host to my SPF record?

Get the host's SPF include or IP from its documentation, then edit your existing v=spf1 TXT record in DNS and add it before the final ~all or -all. Never publish a second SPF record, since two records cause an error.

Is it better to fix SPF or use an SMTP service?

Using an authenticated SMTP service or email API is usually better. It gives more reliable delivery and lets you sign with DKIM. Adding the host to SPF is a workable fallback if you must keep sending from it.

Why does my form email pass SPF but still go to spam?

SPF is only one signal. Missing DKIM, a weak sender reputation, a mismatched From domain or spammy content can still cause junking. Check DKIM and DMARC results in the same headers.

Can FunnelGuard tell me if my form notification fails SPF?

Yes. It submits a test lead on a schedule and reads the SPF result from the Authentication-Results or Received-SPF header of the notification, then alerts you if it fails.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: email_auth: SPF result from Authentication-Results / Received-SPF.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.