Redirect Rules

How to create rules, match URL patterns, proxy external content, and bulk import via CSV.

Rule types

Every rule maps an incoming path on your domain to a destination URL. Rules are matched in priority order: exact match first, then wildcard, then named parameters, then catch-all.

Exact match/old-page → https://example.com/new-page

Matches only the exact path specified. The fastest and most predictable rule type. Use this for individual page redirects.

Wildcard/blog/* → https://example.com/posts

Matches any path that starts with the prefix. The * matches one or more path segments. For redirect rules, the matched suffix is discarded. To carry it through to the destination, include * in the destination URL — see Reverse proxy rules below for the Plausible example.

Named parameters/posts/[slug] → https://example.com/articles/[slug]

Matches a path segment and substitutes its value into the destination. Use this when the URL structure changes but the slug or ID stays the same.

Catch-all(no source path) → https://example.com

Matches any request that has no other matching rule. Set by leaving the source path blank. Useful for full domain redirects.

Reverse proxy rules

Set the rule type to Proxy (200) to fetch the destination and stream its response back to the visitor — without changing the URL in their browser. Unlike a 301 or 302, no redirect is issued. The visitor stays on your domain. The upstream server is invisible.

301 / 302 redirect
  1. 1. Request hits your domain
  2. 2. Browser receives redirect
  3. 3. Browser navigates to destination
  4. URL bar changes
Proxy (200)
  1. 1. Request hits your domain
  2. 2. Edge fetches destination
  3. 3. Response streamed back
  4. URL bar stays the same

Wildcard proxy — the Plausible pattern

The most common use case is proxying an analytics script through your own domain so ad blockers cannot target the upstream hostname. Plausible, Fathom, and Umami all recommend this approach in their own docs.

When you include * in the destination URL of a proxy rule, the matched wildcard suffix is substituted in. This lets you mirror an entire path namespace through your domain.

Proxy Plausible through your domain
Source: /plausible/*
Destination: https://plausible.io/*
Type: proxy
/plausible/js/script.js → fetches https://plausible.io/js/script.js
/plausible/api/event → fetches https://plausible.io/api/event
URL in browser: unchanged

Then update your Plausible snippet to use data-domain pointing to your domain and src pointing to /plausible/js/script.js. Ad blockers that target plausible.io will never see the request.

In redirectiq.json

Proxy rules are fully supported in file sync. Set "type": "proxy" in your redirectiq.json:

{
  "version": 1,
  "redirects": [
    { "from": "/plausible/*", "to": "https://plausible.io/*", "type": "proxy" }
  ]
}

Rules & limits

The destination must be on a different hostname. Proxying to your own domain creates an infinite loop and is blocked at save time.
The upstream response status is passed through as-is. If the destination returns a 404, your visitor receives a 404.
Path and query passthrough toggles are not applied to proxy rules — the wildcard suffix substitution handles path forwarding.
Proxy rules work on any host and stack. You do not need full-site proxy mode (Transparent Proxy) enabled.

Pattern matching

Wildcard ( * )

A * at the end of a source path matches any continuation of that path. It does not capture the matched value for use in the destination — use named parameters if you need to carry the value through.

Wildcard examples
/blog/* matches /blog/any-post, /blog/2024/post, ...
/products/* matches /products/widget, /products/widget/details, ...

Match priority order

  1. 1Exact match — /old-page
  2. 2Wildcard — /blog/*
  3. 3Named parameter — /posts/[slug]
  4. 4Catch-all — (blank source path)

Named parameter capture

Named parameters let you capture a URL segment and substitute it into the destination. This is the right tool when your URL structure changes but IDs, slugs, or other values stay the same — common in CMS migrations and domain rebrands.

Single parameter — [param]

Matches exactly one path segment (no slashes). The captured value is substituted wherever [param] appears in the destination.

Example
Source: /posts/[slug]
Destination: https://newsite.com/articles/[slug]
/posts/my-post → https://newsite.com/articles/my-post
/posts/hello-world → https://newsite.com/articles/hello-world

Multiple parameters

Use multiple named segments to capture and rearrange URL structure.

Example — blog archive migration
Source: /blog/[year]/[slug]
Destination: https://newsite.com/[year]/posts/[slug]
/blog/2024/hello-world → https://newsite.com/2024/posts/hello-world

Spread parameter — [...rest]

Matches the rest of the path including slashes. Use when the path structure after a prefix changes completely.

Example — section rename
Source: /old-section/[...rest]
Destination: https://newsite.com/new-section/[...rest]
/old-section/a/b/c → https://newsite.com/new-section/a/b/c

Note: [param] matches exactly one segment with no slashes. If you need to match multiple segments, use [...rest] or a wildcard rule.

Path & query passthrough

Two optional toggles control how the request path and query string are forwarded.

Preserve path

Appends the full incoming request path to the destination URL. Useful for catch-all rules where you want to mirror the path structure on the new domain.

Catch-all with preserve path
Destination: https://newsite.com
/old/path → https://newsite.com/old/path

Preserve query

Appends the incoming query string to the destination URL. Useful when visitors arrive with UTM parameters or search queries that should carry through to the new location.

Exact match with preserve query
Source: /old-page → https://newsite.com/new-page
/old-page?ref=email → https://newsite.com/new-page?ref=email

Bulk CSV import

Import hundreds of redirect rules at once from a CSV file. All rule types are supported — exact paths, wildcards, named parameters, and catch-alls can all be defined in CSV. This is the fastest way to migrate from Cloudflare Page Rules, .htaccess, Nginx configs, or another redirect management tool.

Full bulk import reference — format, validation, Excel tips, migration guides →
1Open your domain in the dashboard.
2Click "Import CSV" next to the "Add rule" button.
3Upload your CSV file. Max 500 rows, 1 MB.
4Review the results. Invalid rows are reported with a row number and error message — valid rows are imported immediately.
5Rules go live globally within about 60 seconds.

Migrating from Cloudflare Page Rules?

Cloudflare Page Rules are deprecated. If you were using Page Rules for URL forwarding, export your rules from the Cloudflare dashboard and convert them to the CSV format below. Most Page Rules forwarding patterns map directly — see our Cloudflare migration guide for a field-by-field comparison.

CSV format reference

Columns

ColumnRequiredDescription
source_pathYesPath to match. Must start with /. Leave blank for catch-all.
destinationYesFull destination URL including https://.
typeNo301, 302, or proxy. Defaults to 301 if omitted.

Example CSV

source_path,destination,type
/old-page,https://newsite.com/new-page,301
/blog/*,https://newsite.com/posts,301
/posts/[slug],https://newsite.com/articles/[slug],301
/old-section/[...rest],https://newsite.com/new-section/[...rest],301
/plausible/*,https://plausible.io/*,proxy
,https://newsite.com,301

The last row (blank source_path) creates a catch-all rule.

Rules & limits

Header row is optional. If the first row's first cell doesn't start with /, it is treated as a header and skipped.
Maximum 500 rows per import. For larger migrations, split into multiple files.
Maximum file size: 1 MB.
Invalid rows are skipped and reported — valid rows in the same file are still imported.
Duplicate source paths are not deduplicated automatically. If a path already has a rule, a second rule for the same path will be ignored at match time (first match wins).

Plan limits

PlanRules per domainCSV import
Hobby (free)100Up to 100 (plan limit applies)
ProUnlimitedUp to 500 rows per file
AgencyUnlimitedUp to 500 rows per file (split large sets across files)

Have questions not covered here?

Contact us →