Files
mintlify__docs/deploy/cloudflare-firewall-troubleshooting.mdx
Ethan Palm be7a1371ac Custom domain updates (#6465)
* docs: update custom domain setup for new dashboard flow

Reflect the new custom domain UI: hosting mode selector (domain/subdomain
vs subpath), traffic routing options (Mintlify-managed vs proxy-only),
arbitrary base paths with reserved-path list, and base path changes that
redeploy with rollback on failure. Replace references to the removed
Host at /docs toggle in the Vercel and reverse proxy guides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* copy edit

* update images

* docs: update subpath proxy guides for dashboard base paths

Custom subpaths no longer require documentation files to live in a
directory matching the subpath. The base path set in the dashboard is
applied at build time, so the custom subpath reverse proxy setup now
uses the same routing configuration as /docs with the path substituted.
Add dashboard base path setup steps to the Vercel, Cloudflare Worker,
and Route 53/CloudFront guides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* 💅

* add plan gate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* update vercel generator

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* remove gate

* remove gate

* Fix review findings: shared subpath setup snippet, generalize /docs framing, clarify Host header and script guidance

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Align hosting mode and traffic routing labels with dashboard UI, update screenshot alt text

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Fix root-only special file routing: path-preserving nginx destinations, restore sitemap/robots/mcp rewrites, sanitize generator input

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Add apex domain DNS provider requirements

Apex domains get the same CNAME instruction as subdomains, but a CNAME
at the apex requires provider support for CNAME flattening or ALIAS
records. Document the requirement and supported providers, and link to
it from the hosting mode section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Correct special-file routing to base-path destinations per live verification, remove stale toggle images, generalize propagation snippet

Verified against mintlify.mintlify.site: all special files (sitemap.xml,
robots.txt, mcp, skill.md, llms.txt) serve under the base path and 404 at
root, so root-mapping rewrites are reverted and optional root routes now
proxy to base-path destinations. Broken links in es/fr/zh from image
deletion resolve via post-merge translation automation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* remove outdated images

* Update dashboard instructions for Host at toggle UI (mint #8979)

The hosting mode selector and traffic routing options were replaced with
a Host at toggle and inline base path input; routing is now inferred from
DNS. Verified against mint origin/main commit 6fb20b1789.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* 💅

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 18:04:01 -07:00

100 lines
3.4 KiB
Plaintext

---
title: "Cloudflare firewall troubleshooting"
description: "Troubleshoot blocked requests and resolve Cloudflare WAF rule conflicts when serving Mintlify documentation through Cloudflare Workers."
keywords: ["Cloudflare WAF", "firewall rules", "Bot Fight Mode", "403 errors"]
---
If your documentation site shows 500 errors after a few seconds or experiences slow navigation, Cloudflare's firewall may be blocking requests to Mintlify assets.
## 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
1. Log in to your [Cloudflare dashboard](https://dash.cloudflare.com/)
2. Select your domain
3. Navigate to **Security > WAF**
4. Click **Create rule**
5. Configure the rule with these settings:
**Rule name:** Allow Mintlify assets
**When incoming requests match:**
- Field: `Hostname`
- Operator: `equals`
- Value: `docs.yourdomain.com` (replace with your actual docs domain)
**And:**
- Field: `URI Path`
- Operator: `starts with`
- Value: `/mintlify-assets/`
**Then:**
- Action: `Skip`
- Select: `All remaining custom rules`, `Managed rules`, and `Super Bot Fight Mode`
6. Enable **Log** to track matched requests
7. Click **Deploy**
### Verify the rule
After deploying:
1. Open your documentation site in a browser
2. Leave the page idle for 2-3 minutes
3. Navigate between pages
4. Check browser console for any 403 errors
If issues persist, verify your rule configuration:
- Ensure the hostname exactly matches your docs domain
- Confirm the URI path uses `starts with` (not `contains`)
- Do not include wildcards (`*`) in the path value
- Verify that you enabled and deployed the rule
## Common mistakes
- Using `contains` operator with `/mintlify-assets/*` - The `*` is treated as a literal character, not a wildcard
- Using `equals` for 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:
1. Check Cloudflare's **Security > Events** log for blocked requests
2. Verify your Cloudflare Worker (if using a custom subpath) sets the `Host` header to your `<subdomain>.mintlify.site` target instead of passing through the original request's `Host` header
3. Temporarily set Security Level to "Essentially Off" to confirm Cloudflare is the cause
4. Review any custom Page Rules that might override the firewall exception
## Example working configuration
```
Rule: Allow Mintlify assets
Status: Enabled
When incoming requests match:
(http.host eq "docs.flashnet.xyz" and starts_with(http.request.uri.path, "/mintlify-assets/"))
Then:
Skip: All remaining custom rules, Managed rules, Super Bot Fight Mode
Log: Enabled
```