1035 Cloudflare Origin: Edge & web server Last updated 13 Oct 2026

Cloudflare Error 1035 / 1036: Invalid request rewrite (invalid URI path / query string)

A Transform Rule (URL rewrite) produced an invalid path or query string.

Exact message you may see Invalid request rewrite (invalid URI path)Invalid request rewrite (invalid query string)
Seen on: Cloudflare

Meaning

Rewrite expressions that build a path without a leading slash, include illegal characters, or create an invalid query string make Cloudflare reject the request.

Common causes

  • Rewrite expression produces a path without leading “/”
  • Invalid characters or encoding in the rewritten URL
  • Concat/regex_replace mistakes in the expression

⚡ Quick fix

  1. Test the rewrite expression with sample URLs
  2. Ensure the new path starts with /
  3. Disable the rule to confirm

Detailed fix by platform

Cloudflare

  1. bash
    # Rules → Transform Rules → Rewrite URL: example dynamic path
    concat("/v2", http.request.uri.path)

How to diagnose

  1. Rule — Which rewrite matched?
  2. Output — Resulting path/query

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):

1000 — Cloudflare Error 1000: DNS points to prohibited IP (Cloudflare)10001001 — Cloudflare Error 1001: DNS resolution error (Cloudflare)10011002 — Cloudflare Error 1002: DNS points to Prohibited IP / Restricted (Cloudflare)10021003 — Cloudflare Error 1003: Direct IP access not allowed (Cloudflare)10031004 — Cloudflare Error 1004: Host Not Configured to Serve Web Traffic (Cloudflare)10041037 — Cloudflare Error 1037: Invalid rewrite rule (failed to evaluate expression) (Cloudflare)10371040 — Cloudflare Error 1040 / 1041: Invalid request header modification (Cloudflare)10401035

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.