October 19, 2026

Managing 404 Redirects with Cloudflare Redirect Rules and Bulk Redirects

Cloudflare can handle redirects at the edge before requests reach your server. Learn when to use Single Redirects, Bulk Redirects, and what they can't do.

Managing 404 Redirects with Cloudflare Redirect Rules and Bulk Redirects

If your site is behind Cloudflare, you can create redirects at the edge without touching server configuration or your CMS. This is useful for migrations, old campaign URLs and platforms where you can't edit server rules. Cloudflare offers two main tools for this.

Single Redirects (Redirect Rules)

Found under Rules → Redirect Rules, Single Redirects use rule expressions to match requests and redirect them.

Good use cases:

  • redirecting a whole folder: /old-blog/* → /blog/*,
  • forcing a single host or removing a trailing slash,
  • redirecting by country, device or query string.

You can use wildcard patterns or dynamic expressions to keep part of the path. For example, a rule matching https://example.com/old-blog/* can redirect to https://example.com/blog/${1}.

The number of rules available depends on your plan, so they are best for patterns rather than long lists.

Bulk Redirects

Bulk Redirects are designed for large lists of one-to-one redirects, such as a URL mapping after migration.

  1. Create a Bulk Redirect List and add source URL, target URL and status code (or upload a CSV).
  2. Optionally enable preserve query string, include subdomains or subpath matching.
  3. Create a Bulk Redirect Rule that activates the list.

This is ideal when you have hundreds or thousands of old product or article URLs mapped to new ones. For building the mapping itself, see How to Fix 404 Errors After a Website Migration.

What about Page Rules?

Page Rules used to be the standard way to create forwarding URLs in Cloudflare. They are now considered legacy, and Cloudflare recommends moving redirects to Redirect Rules or Bulk Redirects.

Which status code?

Both tools support 301, 302, 307 and 308. Use 301 or 308 for permanent moves and 302 or 307 for temporary ones. See 301 vs 302 vs 307 vs 308 Redirects.

The key limitation: Cloudflare doesn't know about 404s

Edge redirects run before the request reaches your server. Cloudflare doesn't know whether the URL would return 404; it redirects every request that matches the rule.

This means:

  • a broad wildcard can redirect pages that actually exist,
  • you can't create "redirect only if the page is missing" logic with these rules alone,
  • you still need a separate source of 404 data to know which URLs to add.

Watch for conflicts

Redirects may exist in several layers: Cloudflare, the web server, the CMS and plugins. When multiple layers redirect the same URL, you get chains or loops. Keep a record of where each rule lives, and test with curl -I after changes. Our guide on redirect chains and loops covers the process, and no404 Trace shows every hop in one view.

Summary

Cloudflare Single Redirects are best for patterns; Bulk Redirects handle long one-to-one lists; Page Rules are legacy. Because edge redirects can't see 404 responses, they work best alongside a tool that tells you which URLs are actually missing. no404 provides that 404 data in real time and redirects only the URLs that really return 404.