Symptoms
- Documentation page loads initially but crashes with a 500 error after 30-60 seconds
- Slow or broken client-side navigation between pages
- 403 errors in browser console for requests to
/mintlify-assets/*paths - Cloudflare security challenge messages about “malformed data” or “suspicious URL patterns”
Root cause
Cloudflare’s Web Application Firewall (WAF) and Bot Fight Mode can flag Mintlify asset requests as suspicious due to:- Multiple
%symbols in encoded URL parameters - Long query strings with special characters
- Automated requests from idle tabs
Solution
Create a Cloudflare firewall rule to exempt Mintlify assets from security checks.Create the firewall exception
- Log in to your Cloudflare dashboard
- Select your domain
- Navigate to Security > WAF
- Select Create rule
- Configure the rule with these settings:
- Field:
Hostname - Operator:
equals - Value:
docs.yourdomain.com(replace with your actual docs domain)
- Field:
URI Path - Operator:
starts with - Value:
/mintlify-assets/
- Action:
Skip - Select:
All remaining custom rules,Managed rules, andSuper Bot Fight Mode
- Enable Log to track matched requests
- Select Deploy
Verify the rule
After deploying:- Open your documentation site in a browser
- Leave the page idle for 2-3 minutes
- Navigate between pages
- Check browser console for any 403 errors
- Ensure the hostname exactly matches your docs domain
- Confirm the URI path uses
starts with(notcontains) - Do not include wildcards (
*) in the path value - Verify the rule is enabled and deployed
Common mistakes
- Using
containsoperator with/mintlify-assets/*- The*is treated as a literal character, not a wildcard - Using
equalsfor URI Path - This only matches the exact path/mintlify-assets/and not subpaths - Forgetting to skip Bot Fight Mode - This must be explicitly included in the skip action
- Wrong hostname - Must match your actual documentation domain
Additional troubleshooting
If the firewall exception doesn’t resolve the issue:- Check Cloudflare’s Security > Events log for blocked requests
- Verify your Cloudflare Worker (if using custom subpath) correctly forwards the
Hostheader - Temporarily set Security Level to “Essentially Off” to confirm Cloudflare is the cause
- Review any custom Page Rules that might override the firewall exception