Cloudflare Docs
Rules
Rules
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Supported URL components in Bulk Redirects

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

In the reference table below, the provided URL component examples are based on the following URL:

https://user:password@www.example.com:443/search?q=term#results
URL componentSupported in source URL 1Supported in target URL
Scheme
For example:
https
Yes, http or https only
(optional)
Yes
User information
For example:
user:password
NoYes (optional)
Host
For example:
www.example.com
YesYes (optional)
Port
For example:
443
NoYes (optional)
Path
For example:
/search
YesYes
Query string
For example:
q=term
NoYes, if Preserve query string is false (optional)

You can only add a query string to the target URL if you do not keep the original query string (that is, if Preserve query string is false). If you set Preserve query string to true, the query string of the request will be passed along when there is a match for the source URL.
Fragment
For example:
results
NoYes (optional)

  1. Supported in source URL = No means that you cannot include the component in the source URL to match against the URL of incoming requests. ↩︎

Bulk Redirects also support target URLs without an authority component 2, like the following URL:

magnet:?xt=urn:btih:2bd9d334e8d1e5bd7768755173222db5c6dea13b&dn=archlinux-2021.07.01-x86_64.iso
  1. The URL authority is the combination of user information, host, and port components.