Skip to content
AnswerWell geo Documentation

Research · 8 min read · Answerwell

Redirect URL Components, Matching Limits, and Validation Errors

Which URL parts work in redirect source and target URLs, account limits, CSV rules, and how to fix common Cloudflare validation errors.

This page summarises Cloudflare documentation on Bulk Redirects (redirect lists and rules), related 10xxx validation errors, CSV import rules, and how Cloudflare Access application paths treat URLs differently. If you are matching redirects, importing a list, or seeing errors such as “invalid redirect source URL” or “source URL in redirect is too long”, the constraints below are usually the cause.

Supported URL components: source URL vs target URL

Section titled “Supported URL components: source URL vs target URL”

Bulk Redirect source and target URLs do not support the same parts of a URL. Matching is done against what the rule allows in the source string; the target is where the client is sent after a match, with behavior shaped by options like Preserve query string and Preserve path suffix.

Cloudflare illustrates components using this example URL:

https://user:password@www.example.com:443/search?q=term#results

URL component Supported in source URL Supported in target URL
Scheme (http / https) Yes (http or https only; scheme may be omitted so the rule applies to both) Yes (required on target)
User information (user:password) No Yes (optional)
Host Yes Yes (optional)
Port No Yes (optional)
Path Yes Yes
Query string (?q=term) No Yes, only if Preserve query string is false
Fragment (#results) No Yes (optional)

The source and target URLs of a URL redirect support different URL components.

— Cloudflare, Supported URL components in Bulk Redirects

Supported in source URL = No means you cannot put that component in the source URL used for matching incoming requests. Fragments are never sent to the server on HTTP requests; putting #… in a source URL still fails validation because it is not a valid match key.

Target URLs may omit an authority (no host), for example deep links such as magnet:?xt=… as described in the same reference.

Query string on the target when Preserve query string is enabled

Section titled “Query string on the target when Preserve query string is enabled”

If Preserve query string is true, the redirect keeps the incoming request’s query string. You cannot also define a fixed query on the target URL without a conflict.

When Preserve query string is enabled, the final redirect URL uses the original request’s query string. Any query string on the target URL is discarded — even when the original request has no query string of its own. To add a fixed query parameter to redirected URLs, leave Preserve query string disabled and include the parameter directly in the target URL.

— Cloudflare, URL redirect parameters

Enabling Preserve query string while the target URL still contains ?… triggers Error 10055: disable preservation or remove the query from the target.

Source URL matching: path, subdomains, and normalization

Section titled “Source URL matching: path, subdomains, and normalization”

The mandatory source URL (source_url) is what an incoming request must match (up to 32 KB). Scheme is optional on the source; omitting it applies the redirect to both http and https.

The URL string that the incoming request URL must match for the redirect to be applied. This property is mandatory. The maximum length of the source URL is 32 KB.

— Cloudflare, URL redirect parameters

Exact matching behavior depends on Include subdomains and Subpath matching. With Include subdomains true, a source like http://example.com/about also matches http://a.example.com/about and deeper subdomains.

A single Bulk Redirect List cannot contain several redirects with the exact same source URL.

Redirect based on the URL before normalization

Section titled “Redirect based on the URL before normalization”

By default, matching may use a normalised URI. To match the raw URL as received on the Cloudflare network (before normalization), use the raw.http.request.full_uri field in both the rule expression and the key instead of http.request.full_uri, as described in the Bulk Redirects FAQ.

Same hostname and path across lists (16-item cap)

Section titled “Same hostname and path across lists (16-item cap)”

You may have many redirects that share a hostname with different paths, or share a path on different hostnames. However:

You can have a maximum of 16 source URLs with the same hostname and path across all lists, either enabled by a Bulk Redirect Rule or not.

— Cloudflare, Bulk Redirects FAQ

If dashboard or API creation fails with a limit error on URL matching items for the same hostname/path, remove unused entries from any Bulk Redirect List that reuse that pair—even on lists not attached to a live rule.

Error 10059 indicates too many redirects sharing the same source path account-wide (regardless of domain). Consolidate or deduplicate lists; see URL redirect parameters for current path limits.

Source and target URLs each allow at most 32,768 characters (documented as 32 KB in the parameters reference). Long tracking query strings or path stacks often cause Error 10043 (source) or Error 10044 (target). Shorten the URL or redirect via a shorter intermediary path.

When building a CSV for upload:

The source URL cannot include a query string. For details on which URL components are supported in source URLs, refer to Supported URL components in Bulk Redirects. The CSV file must not include a header row with column names. A source/target URL must be enclosed in quotes (“) when it includes a comma (,). You can always enclose URL values in quotes, but it is not required. You can skip an optional value by immediately entering a comma (the delimiter) without entering any value. You do not need to include trailing commas.

— Cloudflare, CSV file format for Bulk Redirects

Strip ?… from every source column before import; use Preserve query string on the redirect row instead of embedding query parameters in the source.

Redirect options that must be paired correctly

Section titled “Redirect options that must be paired correctly”
Option Requirement Error if wrong
Preserve path suffix Subpath matching must also be enabled Error 10048
Preserve query string Target URL must not include its own query string Error 10055
Redirect status code One of 301, 302, 307, 308 Error 10047

Preserve query string (default false) passes the client’s query to the target path when enabled—for example /my-folder/?name=value → /other-folder/?name=value when redirecting /my-folder/ to /other-folder/ with preservation on (URL redirect parameters).

Cloudflare Access application paths: ports, query strings, and #

Section titled “Cloudflare Access application paths: ports, query strings, and #”

Access application paths follow stricter rules than Bulk Redirect source URLs. They are not interchangeable.

Component Access application path behavior
Port in URL Not supported; Access strips the port and redirects to the default HTTP/HTTPS port
Query string (?foo=bar) Not supported in the path definition
Fragment (#…) Not supported; browser handles anchors—e.g. dashboard.com/#settings redirects to dashboard.com

Port numbers are not supported in Access application paths. If a request includes a port number in the URL, Access will strip the port number and redirect the request to the default HTTP/HTTPS port.

— Cloudflare, Application paths

Similar “strip query and fragment” behavior appears in Observatory tested URLs: parameters and anchors appended to a test URL are dropped and the test runs against the path only (e.g. https://example.com/blog/?utm_medium=social#title becomes https://example.com/blog/). That is unrelated to redirect matching but explains why copied browser URLs often include parts products ignore.

These errors appear when creating or updating Bulk Redirects via dashboard or API.

Code Meaning Typical fix
10043 Source URL too long Shorten source (max 32,768 characters)
10044 Target URL too long Use a shorter target URL
10045 Invalid redirect source URL Valid URL with required components; see supported components
10046 Invalid redirect target URL Valid target URL with scheme
10047 Invalid status code Use 301, 302, 307, or 308
10048 Preserve path suffix without subpath matching Enable Subpath matching
10049 Invalid scheme on source http, https, or empty (both schemes)
10050 User info on source Remove user:password@ from source
10051 Missing authority on source Add hostname (not http:///path)
10052 Port on source Remove :port from source
10053 Query string on source Remove ?… from source; use preservation on target
10054 Fragment on source Remove #… from source
10055 Query settings vs target query Disable Preserve query string or remove target query
10059 Too many redirects with same source path Dedupe lists; check path limits in parameters
10060 Missing scheme on target Add https:// (or http://) to target
  1. In the Cloudflare dashboard, open Bulk Redirects, edit the list or rule, and confirm the source URL contains only allowed components per Supported URL components in Bulk Redirects (no query, port, fragment, or user info on the source).

  2. Confirm the target URL includes a valid scheme and length under 32 KB; align Preserve query string and Preserve path suffix with URL redirect parameters.

  3. If import fails, re-check the CSV against CSV file format for Bulk Redirects (no header row, no query in source column).

  4. Test the live URL in a browser or with curl -I against the hostname on Cloudflare; for Access-protected apps, verify the path without port, query, or hash matches Application paths definitions.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.