On this page
What this issue is
A WAF is a filter in front of your site that blocks requests that look like attacks. Ad platforms add tracking parameters to your landing page URL, such as gclid (Google Ads), fbclid (Meta), msclkid (Bing) and utm_* tags. These values are long, random-looking strings. Some WAF rules read that as an attack.
Why it costs you leads or sales
- Ad clickURL carries a long gclid and UTMs
- WAFQuery string flagged, returns 403
- Landing pageNever loads
- Form or checkoutNever reached
- ConversionNever tracked
The visitor clicks a paid ad, but the firewall stops the request before your site responds.
Example: 1,000 paid clicks in a day, where the firewall blocks a share of long-query URLs.
How to check if your site has it
Build a realistic URL
Take your landing page and add a long fake gclid plus UTMs, e.g. ?gclid= followed by about 100 characters, and utm_source, utm_medium, utm_campaign, utm_content, utm_term.
Request it and read the status
Use the command below or open the URL in a private window. Anything other than 200 (or an expected redirect) is a warning sign.
Compare with the clean URL
If the clean URL returns 200 and the long one returns 403, 406, 414 or a challenge, the query string is being filtered.
Check the WAF log
In Cloudflare see Security > Events; in Sucuri, Wordfence, AWS WAF, or your host panel see the firewall log. Look for the blocked request and the rule ID.
LONG=$(printf 'A%.0s' {1..120})
curl -s -o /dev/null -w "clean: %{http_code}\n" https://example.com/landing/
curl -s -o /dev/null -w "ad url: %{http_code}\n" "https://example.com/landing/?gclid=${LONG}&utm_source=google&utm_medium=cpc&utm_campaign=spring_sale"How to fix it
Find the blocking plugin or host rule
Check the firewall log in Wordfence, Sucuri, or your host's WAF. Note the rule ID for the blocked gclid request.
Add a narrow exception
Allow-list the parameter names gclid, fbclid, msclkid and utm_* for that rule, or ask your host to do it for the ModSecurity rule ID.
Raise the length limits
In nginx raise large_client_header_buffers (default 4 x 8k) if you see 414 or 400. In Apache check LimitRequestLine.
Exclude parameters from the rule
For ModSecurity with OWASP CRS, exclude the ARGS names from the rule ID in the log using SecRuleUpdateTargetById, rather than disabling the rule.
Know the limit
GTM does not control the firewall. Fix the rule at the WAF or CDN, then retest the tags on the landing page.
Check what sits in front
Webflow hosting rarely blocks these URLs. If you front it with Cloudflare or another WAF, fix the rule there.
Check any proxy in front
Shopify handles ad parameters itself. If you proxy your domain through a CDN with a WAF, add the exception there.
Expression:
(http.request.uri.query contains "gclid=") or (http.request.uri.query contains "fbclid=") or (http.request.uri.query contains "utm_source=")
Action: Skip > select the managed rules or rate limiting rule that is blocking.
Place it above the blocking rule.How to confirm it's fixed
- The long-query curl test returns 200 (or the same redirect as the clean URL)
- The WAF log shows no new blocks for gclid or UTM requests
- The landing page loads in a private window with the long URL
- Your tags fire on that page and the form still submits
- Landed sessions in analytics move closer to clicks in the ad platform over the next days
How to prevent it happening again
Rule active
Leads or data lost
Ad click returns 403. The visitor sees an error, and no session or conversion is recorded.
Toggle to see what happens to a paid click with and without the blocking rule.
How FunnelGuard handles this
Questions people ask
Why is my WAF blocking Google Ads clicks?
The gclid parameter is a long, random-looking string, and some WAF rules treat long or encoded query strings as attacks. Check the firewall log for the blocked request and its rule ID, then add a narrow exception for that rule.
Why do I get a 403 error only when I add gclid to my URL?
A rule is reacting to the query string, not the page. Your clean URL passes, but the long gclid or UTM values hit a length limit or pattern match. The WAF event log will show which rule fired.
How do I stop Cloudflare blocking UTM parameters?
Open Security > Events, find the blocked request and see which rule or managed ruleset triggered it. Then add a custom rule with a Skip action for requests whose query contains gclid, fbclid or utm_ parameters, placed above the blocking rule.
Is it safe to allow gclid through my firewall?
Yes, if you keep the exception narrow. Allow known ad parameter names on your landing pages only, and leave other rules active. Do not disable the whole rule set.
What is a 414 error on an ad landing page?
A 414 means the URL was too long for the server or proxy. Raise the limit, such as large_client_header_buffers in nginx or LimitRequestLine in Apache, or shorten the tracking parameters.
How can I tell if ad clicks are being blocked?
Compare clicks in your ad platform with landed sessions in analytics. A big gap, plus a 403 when you test a long ad-style URL, points to a block. The WAF log confirms it.
Will a WAF block affect organic traffic too?
Usually not, because organic URLs have no long tracking query. That is why the problem often only shows in paid reports.
Related issues
- OPS-111Cache stripping UTM/gclid query paramsFix guide
- OPS-100Cloudflare/WAF blocks real visitors (challenge loops)Fix guide
- OPS-102Country/geo block hitting target marketFix guide
- OPS-103WAF rule blocking form submissions with certain wordsFix guide
- OPS-122Allow-list missing for monitoring IPs (false blocks)Fix guide
- OPS-101Bot Fight Mode blocking checkout or form postsFix guide