Error 1035 occurs when a Cloudflare Transform Rule (URL rewrite) generates an invalid URI path. Transform Rules let you modify request URLs, headers, and other properties at the Cloudflare edge before the request reaches your origin. If a dynamic rewrite expression produces a path that is not a valid URI — for example, containing illegal characters, missing the leading slash, or resulting in an empty path — Cloudflare returns 1035 instead of forwarding the malformed request.
The Transform Rule's expression evaluates to a string that is not a valid URI path — it may contain spaces, special characters, or be empty.
The rewrite rule uses a variable or field that does not exist for the current request, resulting in an unexpected or empty value.
A regex-based rewrite produces malformed output due to incorrect capture group references or pattern matching.
In the Cloudflare dashboard, go to Rules > Transform Rules. Check the URL rewrite rules and verify their expressions produce valid paths for all possible request inputs.
Identify which URL triggers the error and trace it through your rewrite rules to see what output the expression generates.
Use conditional expressions in your rewrite rules to handle edge cases where the rewrite might produce an invalid path. Add a default fallback path.
A Cloudflare Transform Rule produced a URL that exceeds the maximum allowed length.
A Cloudflare Transform Rule's expression could not be evaluated at runtime.
A Transform Rule attempted to modify a request header that Cloudflare does not allow to be changed.