Skip to content
FunnelGuard

Fix guide by FunnelsGuard

WAF blocking form submissions with certain words: how to fix it

DLV-205High impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

A web application firewall (WAF) sits in front of your site and inspects requests. It looks for patterns that resemble attacks, such as SQL injection or cross-site scripting. Common WAFs include Cloudflare, Sucuri, ModSecurity (with the OWASP Core Rule Set), AWS WAF and plugins like Wordfence.

Why it costs you leads or sales

The people most likely to hit this are the ones who write longer, detailed messages. These are often your best leads. They type a message, press send, get a 403 or a blank page, and most will not try again. Because the failure depends on the words used, most test submissions pass and the problem can run for weeks unnoticed.

Where the lead is lost
  1. Visitor fills formMessage contains words like 'select' or 'script'
  2. WAF inspects POSTRule matches and returns 403
  3. Form handlerNever receives the request
  4. Email and CRMNo notification, no record

The WAF rejects the request before the form handler sees it, so nothing downstream runs.

A normal message gets a 403

The visitor submits a real enquiry and the firewall answers with an error instead of the thank-you page.

How to check if your site has it

Check for WAF blocks on form submissions
  1. Submit a test with a plain message

    Send the form with 'Hello, this is a test'. If this works, the form itself is fine.

  2. Submit again with trigger words

    Use a message such as: 'Please select a time and drop me a line. Union of two teams, order by Friday.' Then try a message with <script> in it. Use a test email address you control.

  3. Watch the response

    Open browser developer tools, go to the Network tab, submit and look at the POST request. A 403 or 406 status, or a block page naming Cloudflare, Sucuri or ModSecurity, points to the WAF.

  4. Read the WAF log

    Cloudflare: Security > Events. Sucuri: the firewall audit trail. Wordfence: Tools > Live Traffic or the Blocked list. ModSecurity: the audit log, often /var/log/modsec_audit.log. Find the rule ID and the matched text.

  5. Check your server access log

    Look for POST requests to the form URL with a 403 status. A cluster of them from different visitors is a strong sign.

Common signs and what they suggest
What you seeLikely meaning
403 only when message has certain wordsWAF rule on request body content
403 on every submissionEndpoint blocked, bot rule or wrong permissions
Block page with a Ray IDCloudflare WAF or managed rules
Rule ID starting 942 or 941 in the logOWASP CRS SQL injection or XSS rule
Form shows success but no emailNot a WAF block; check email delivery

How to fix it

Do not switch the WAF off. Create a narrow exception that applies only to the form endpoint and only to the rule or field that caused the false positive.

Add an exception for the form endpoint
  1. Find which layer blocks

    Check Wordfence, Sucuri or your host's firewall log for the blocked POST. Note the rule and URL, for example /wp-admin/admin-ajax.php or /wp-json/contact-form-7/.

  2. Allowlist the rule

    In Wordfence: Firewall > Blocking or the firewall's Allowlisted URLs, add the form URL and the parameter name (such as your message field). In Sucuri, request an allowlist for the URL path in the firewall settings.

  3. Ask your host if needed

    On managed hosting, ModSecurity is controlled by the host. Send them the rule ID and the URL and ask for an exception.

ModSecurity: exclude one field from one ruletext
# Replace 942100 with the rule ID from your audit log
# and /contact with your form path
SecRule REQUEST_URI "@beginsWith /contact" "id:1000100,phase:1,pass,nolog,ctl:ruleRemoveTargetById=942100;ARGS:message"

How to confirm it's fixed

Confirm the fix
  • Resubmit the exact message that was blocked and get the normal thank-you page
  • The POST in the Network tab returns 200 or a redirect, not 403
  • The test lead arrives in your inbox and CRM
  • The WAF log shows no new block for that rule on the form URL
  • Other rules still block a real attack string on other pages

How to prevent it happening again

Run new WAF rules in log or count mode first and read the results before enforcing. After any change to Cloudflare managed rules, a host migration, a security plugin update or a rule set upgrade, resubmit every form with a long message that includes trigger words. Review WAF events weekly for blocked POSTs to form URLs. Keep a short note of each exception: URL, rule ID, date and reason.

Submissions lost to false positivesExample numbers
Submissions lost to false positives (example)Genuine attempts: 200 leads per month; Blocked by WAF: 18 leads per month; Delivered: 182 leads per month07715320018182Genuine attemptsBlocked by WAFDeliveredleads per month

Example: a form gets 200 genuine submissions a month and the WAF blocks messages with certain words. Numbers are illustrative.

How FunnelGuard handles this

FunnelGuard detects this issue only partly. A robot visitor runs your form journey on a schedule and flags a submit failure if the form does not complete, for example when the POST returns an error such as a 403. You get one alert, after a second-region re-check, with a screenshot and a likely cause.

What it does not do: the test submission uses ordinary test text, so it will not hit a rule that only fires on specific words. A WAF that blocks only messages containing, say, 'select' or 'script' can pass every FunnelGuard check while real visitors fail. FunnelGuard also never bypasses bot protection, so a block aimed at automated traffic is a separate matter.

Frequently asked questions

Questions people ask

Why is my contact form giving a 403 error when I submit it?

A 403 on submit often means a firewall rejected the request. A web application firewall may have matched words in the message against an attack rule. Check the WAF log for the blocked POST and its rule ID.

Why does my form only fail when the message contains certain words?

WAF rules scan the text of a POST for patterns that look like SQL injection or script injection. Words such as 'select', 'union', 'drop' or '<script>' can match. Short plain messages pass, so the fault looks random.

How do I stop a WAF blocking legitimate form submissions?

Find the rule ID in the WAF log, then add an exception limited to the form URL and, if possible, the message field. Do not disable the WAF entirely. Retest with the same text that failed.

Is it safe to whitelist a WAF rule for my form?

It is safe if the exception is narrow: one URL, one field and one rule. Your form handler must still validate and escape input. Keep rate limits and CAPTCHA active.

How can I tell if Cloudflare is blocking my form?

Go to Security > Events in Cloudflare and filter by the form path and the POST method. A blocked request shows the rule, the action and a Ray ID. The visitor sees the same Ray ID on the block page.

Will an uptime monitor catch a WAF blocking form posts?

Usually not. Uptime checks load pages with GET requests and do not submit forms. A synthetic form check can catch a general submit failure, but a rule triggered only by certain words needs a manual test with those words.

Can FunnelGuard detect a WAF blocking my form?

Partly. It flags a submit failure when its test submission fails, but its test text is ordinary, so a word-specific rule may not trigger. Test trigger words by hand to cover that gap.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: Submit failure detected.

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.