In Cloudflare, when do you use Single Redirects rather than Bulk Redirects to move an old blog's URLs onto a new domain?
answer
- pattern versus list
- zone rule versus account list
- wildcard_replace and ${2}
- Subpath matching, Include subdomains
- Single Redirects run first
basics
~20 sUse a Single Redirect when one wildcard pattern maps the old paths onto the new domain, such as /blog/* to https://blog.example.net/${2}. Use Bulk Redirects for an irregular list of exact source and target URLs, kept at the account level.
solid answer
~40 s**Single Redirects** are zone rules: an expression or wildcard pattern selects requests and the target can be computed, for example `https://blog.example.net/${2}` from `http*://example.com/blog/*`, with regular expressions on Business and Enterprise. They default to 301 with **Preserve query string** off. **Bulk Redirects** are static URL redirects in a **Bulk Redirect List**, enabled by a **Bulk Redirect Rule** at the account level, so one list can serve several zones. They have no wildcards; **Subpath matching**, **Preserve path suffix**, **Include subdomains** and **Preserve query string** shape the match instead, and quotas run from 10,000 entries on Free to 1,000,000 on Enterprise. Pick Single for a pattern and Bulk for a renamed-post list, and never overlap them: Single Redirects run first, so a broad pattern shadows the list.
code
plaintext · 3 linesexample.com/blog/hello-world,https://blog.example.net/posts/hello,301,TRUE,,TRUE
example.com/blog/2019/launch-notes,https://blog.example.net/posts/launch,301,TRUE,,TRUE
example.com/blog/,https://blog.example.net/,301,TRUE,,TRUE,FALSEgo deeper
Recall that Single Redirects are per-zone pattern rules and Bulk Redirects are account-level lists, and that both need a proxied hostname.
Explain wildcard capture in a Single Redirect target, the list and rule structure of Bulk Redirects with its four parameters, the defaults, and the per-plan quotas.
Spot the ordering trap: Single Redirects run first and stop evaluation, so a broad pattern shadows list entries, and a Single Redirect cannot reference a list to exclude them.
Decide where a migration's redirect map lives and who maintains it, given that an account-level list is shared across zones while Single Redirects stay inside each zone's quota.
## Two redirect products Cloudflare offers two rule-based ways to answer a request with a redirect, a response whose `Location` header sends the visitor to another URL: - **Single Redirects**: rules in one zone, each with an expression that selects requests and a target URL that is static or computed from the request. - **Bulk Redirects**: lists of individual URL redirects, kept at the account level and switched on by a Bulk Redirect Rule. Both need the source hostname proxied through Cloudflare. Cloudflare's own guidance is that Single Redirects are the default and Bulk Redirects are for a large number of static redirects. A URL Rewrite Rule is not a third option: it changes the path the origin sees while the browser keeps the old URL, and it cannot change the hostname at all. ## Single Redirects - Configured per zone, in the `http_request_dynamic_redirect` phase, the first of the request phases. - The dashboard's **Wildcard pattern** view takes a **Request URL** such as `http*://example.com/blog/*` and a **Target URL** such as `https://blog.example.net/${2}`, where `${2}` is the text the second `*` matched. Underneath, it is a dynamic redirect built with the `wildcard_replace()` function. - A dynamic redirect can build its target from any expression; regular expressions need Business or Enterprise. - Status code: 301 by default, or 302, 307 or 308. **Preserve query string** is off by default. - Rules per zone: 10 on Free, 25 on Pro, 50 on Business, 300 on Enterprise. ## Bulk Redirects - Three parts: **URL redirects** (source URL, target URL, status code, parameters), a **Bulk Redirect List** that holds them, and a **Bulk Redirect Rule** that enables the list. A list on its own redirects nothing. - No wildcards, no regular expressions and no string replacement. Four parameters stand in: - **Subpath matching** applies a redirect to the paths below its source path. - **Preserve path suffix** copies the unmatched rest of the path onto the target when Subpath matching is on. - **Include subdomains** also matches the subdomains of the source host. - **Preserve query string** keeps the request's query string and discards any query string written on the target. - Source URLs cannot contain a query string, and one list cannot hold two entries with the same source URL. - Quotas are per account, set by the highest plan on it: 10,000 URL redirects across lists on Free, 25,000 on Pro, 50,000 on Business and 1,000,000 by default on Enterprise, with 15 Bulk Redirect Rules (50 on Enterprise). - Entries can be imported from a CSV file with no header row, one redirect per line. ## Side by side | | Single Redirects | Bulk Redirects | |---|---|---| | Scope | One zone | Account, across its zones | | Matching | Any expression; wildcards; regex on Business and Enterprise | Exact source URL plus parameters | | Target | Static or computed | Static | | Best for | A pattern | A long, irregular mapping | | Order | First request phase | After Origin Rules and the WAF | ## Planning the blog move 1. If the new domain keeps the same slugs, one Single Redirect does it: Request URL `http*://example.com/blog/*`, Target URL `https://blog.example.net/${2}`, status 301, Preserve query string on. 2. If slugs changed irregularly, put each old post in a Bulk Redirect List, import it from CSV and enable it with a Bulk Redirect Rule whose default expression is `http.request.full_uri in $<LIST_NAME>`. 3. If you also want a catch-all entry for `example.com/blog/` with Subpath matching, turn Subpath matching on for the post entries too: between two subpath entries, the one with the more specific path wins. 4. Do not split the same paths across both products. Single Redirects run first and a redirect stops evaluation, so a Single Redirect for `/blog/*` answers every request before any list entry under `/blog/` is looked at. A Single Redirect cannot exclude the list's URLs either, because only Bulk Redirect Rules can reference Bulk Redirect Lists. 5. Check a few old URLs with Cloudflare Trace before announcing the move, since a permanent redirect is remembered by browsers once they have seen it. The result is one place to read each mapping: a single pattern when the URLs follow a rule, a list when they do not.
- Can a Single Redirect's expression test whether a URL is in a Bulk Redirect List, so the two can share the /blog/ paths?No. Bulk Redirect Lists can be referenced only by Bulk Redirect Rules; no other rule type can use them. You cannot write a Single Redirect that excludes the listed URLs, which is why overlapping mappings belong in one product.
- Why does a Bulk Redirect whose target ends in ?ref=old-blog lose that parameter?Because Preserve query string is on. The final URL then uses the request's query string and discards the target's, even when the request has none. To add a fixed parameter, turn Preserve query string off and write the parameter into the target URL.
- A form that POSTs to an old URL must keep working after the move. Which status code do you give the redirect?307 for a temporary move or 308 for a permanent one. With 301 or 302 a client may switch POST to GET when following the redirect; 307 and 308 require it to keep the method. Both redirect products accept 301, 302, 307 and 308.
- Bulk Redirects accept wildcards and regular expressions in source URLs.
- A Single Redirect keeps the query string unless you turn that off.
- A Bulk Redirect List starts redirecting as soon as it is uploaded.
- When a Single Redirect and a Bulk Redirect both match, the more specific one wins.
- Redirect rules work for a hostname whose DNS record is DNS-only.
Assumes Cloudflare's quotas as of 2026-10-10, after the February 2025 increase that raised Bulk Redirects to 10,000 to 1,000,000 URL redirects across lists depending on plan.