Skip to content
FunnelGuard

Fix guide by FunnelsGuard

WAF blocking form submissions with certain words: fix it

OPS-103High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A WAF sits in front of your website and filters requests. It looks for patterns that resemble attacks such as SQL injection (database commands hidden in input) and cross-site scripting (code hidden in input). Some rules match plain words or characters in a form message.

The problem is a false positive. A real person writes 'Please select a time, we need a script for our video' in the message box. The rule sees select and script and rejects the request, usually with a 403 Forbidden or a block page. The form works with most text and fails with some, which makes it hard to spot.

Common sources are Cloudflare managed rules, AWS WAF, Sucuri, Imperva, ModSecurity with the OWASP Core Rule Set, and WordPress security plugins such as Wordfence.

Why it costs you leads or sales

The blocked visitor is a real prospect who took the time to write a message. They see an error, assume your site is broken and leave. You never see the attempt, because the request never reaches your form handler, your inbox or your CRM.

Detailed enquiries are the most likely to trip rules. Longer messages, technical wording, URLs and quotes all raise the odds. So you can lose your most serious leads while short test messages keep passing.

Where the lead is lost
  1. Visitor fills formMessage includes words like select or a link
  2. WAF inspects POSTRule matches the text and returns 403
  3. Form handlerNever receives the request
  4. Inbox and CRMNo lead, no conversion tag

The WAF rejects the request before the form handler sees it.

Blocked messages hide in the totalsExample numbers
Blocked messages hide in the totals (example)Submitted by visitors: 100 leads per month; Reached your inbox: 88 leads per month; Blocked by WAF: 12 leads per month038771008812Submitted by visitorsReached your inboxBlocked by WAFleads per month

Example: 100 real visitors submit the form. A rule blocks 12 of them, so only 88 leads arrive.

How to check if your site has it

Test whether certain text is blocked
  1. Submit a plain message

    Send a short message such as 'Test enquiry, please ignore'. Note whether it arrives.

  2. Submit a message with trigger words

    Send one containing select, union, script, drop table, a full https:// link, quotes and angle brackets. Do it one item at a time to find which one fails.

  3. Watch the response

    Open browser developer tools, go to the Network tab, submit again and look at the form request. A 403 or a block page instead of 200 points to a firewall.

  4. Read the firewall log

    Look for the blocked request around the same time. Note the rule ID, the URL and the field that matched.

Where to find blocked requests
ToolWhere to look
CloudflareSecurity > Events (filter by action Block and your form URL)
AWS WAFWeb ACL > Sampled requests, or your WAF logs
ModSecuritymodsec_audit.log or the Apache or Nginx error log
WordfenceWordfence > Tools > Live Traffic, or the Blocked list
SucuriFirewall dashboard > Audit Trails

How to fix it

Do not switch the WAF off. Make the smallest exception that lets the form work: one rule, one URL, ideally one field.

Tune the rule safely
  1. Identify the rule

    From the log, copy the rule ID or name and the form URL that was blocked.

  2. Scope an exception narrowly

    Skip or lower that single rule only for the form endpoint, such as POST requests to /contact or /wp-admin/admin-ajax.php with your form action. Do not exempt the whole site.

  3. Keep other protections on

    Leave rate limiting, bot rules and other managed rules active for that URL.

  4. Retest with the failing text

    Submit the exact message that was blocked and check the log shows no block.

Where to add the exception
  1. Cloudflare custom rule

    Go to Security > WAF > Custom rules and create a rule with action Skip. Match URI Path equals your form path and Request Method equals POST. Choose to skip the specific managed rule that fired, not all managed rules.

  2. ModSecurity

    Add a targeted exclusion, shown in the snippet below, instead of disabling the engine.

ModSecurity: exclude one field from one rule on the contact URLtext
SecRule REQUEST_URI "@beginsWith /contact" "id:1000101,phase:1,pass,nolog,ctl:ruleRemoveTargetById=942100;ARGS:message"

How to confirm it's fixed

Confirmation checks
  • The exact text that failed now submits and returns a normal success response
  • The firewall log shows no new block for the form URL
  • The test lead arrives in your inbox and CRM
  • Conversion tags still fire on the thank-you step
  • Other pages and forms are still protected by the same rule

How to prevent it happening again

Prevention habits
  • Review firewall events for your form URLs after every WAF rule update or plan change
  • Test forms with realistic long messages, links and punctuation, not only 'test'
  • Use narrow exceptions tied to a URL and field, and note them in your documentation
  • Try new WAF rules in log or simulate mode before enforcing them
  • Run a scheduled check of every lead form so a new block is caught within a day

How FunnelGuard handles this

FunnelGuard detects this today. A robot visitor runs your real lead form on a schedule and checks each step. If the submit fails, for example because the firewall returns an error, the check fails. The failure is re-checked from a second region, then one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause.

The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month with a 3-day free trial.

Form behaviour

Before the fix

  • Messages with certain words return 403
  • No lead in inbox or CRM
  • Nobody notices for weeks

After the fix

  • Narrow exception for one rule and field
  • All message text reaches the handler
  • Scheduled test alerts you if it breaks again

Questions people ask

Why is my contact form blocked when the message contains certain words?

A web application firewall is probably matching words like select, union or script as an attack pattern. This is a false positive. Check the firewall log for a blocked POST to your form URL and note the rule ID.

How do I find which WAF rule is blocking my form?

Submit the failing text, then open the firewall log (Cloudflare Security > Events, AWS WAF sampled requests, or the ModSecurity audit log). Filter by your form URL and the time of the test. The entry shows the rule ID and often the field that matched.

Why does my form return 403 Forbidden only sometimes?

Rules match on content, so short or plain messages pass while longer ones with links, quotes or technical words get blocked. That is why the form seems to work in your own tests. Try a long message with a URL to reproduce it.

Should I turn off my WAF to fix form blocks?

No. Add a narrow exception for the one rule that fired, on the form URL and ideally one field. This keeps the rest of the protection in place.

How do I stop Cloudflare blocking my form submissions?

Find the event in Security > Events, then create a custom rule with the Skip action for that managed rule, limited to POST requests on your form path. Retest with the text that failed.

Can a WordPress security plugin block my form?

Yes. Plugins such as Wordfence have their own firewall and can reject form requests. Check the live traffic or blocked list and allowlist the specific parameter or rule.

How can I tell if my form is losing leads to a firewall block?

Compare form submissions with firewall block events for the same URL, and test with realistic messages. A scheduled synthetic check such as FunnelGuard also alerts you when the form submit fails.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Submit fails.

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.