Path redirects

A path redirect targets one specific URL, or a group of URLs under a shared prefix, rather than an entire domain. This article covers exactly how matching works, including a few gotchas worth knowing before you set one up.

Two forms, nothing more

Path rules support exactly two patterns. An exact path, like /about, matches that URL and nothing else. A prefix with a trailing wildcard, like /blog/*, matches everything under it. There's no support for wildcards in the middle of a path (something like /blog/*/comments won't work as expected, the * is only meaningful at the very end).

Exact matching

/about matches only /about, nothing more, nothing less. Use this for single-page redirects: a page that moved, a typo'd URL, a specific link you want pointed elsewhere.

Prefix matching and wildcard destinations

/blog/* matches /blog/, plus anything after it, /blog/post-1, /blog/post-2/comments, and so on. Pair it with a wildcard destination like https://newsite.com/* and whatever was captured after /blog/ carries over automatically, so /blog/post-1 lands on https://newsite.com/post-1 without a rule for every single page. This is the fastest way to move an entire section of a site while preserving its structure.

Things to watch for

Query strings are part of the match

Matching runs against the full path plus query string. A rule for /about will not match /about?utm=source, that's treated as a different string entirely. If you need to catch traffic that might carry query parameters, use a prefix rule (/about/*) instead of an exact one.

Trailing slashes aren't normalized

/about and /about/ are different paths as far as matching is concerned. An exact rule for one won't catch the other, if both are in use, you may need a rule for each.

Matching is case-sensitive

/About and /about are treated as different paths. Double-check the casing of your source URLs matches exactly what's actually being requested.

Priority over global rules

A path rule, exact or prefix, always takes priority over a Global (*) catch-all on the same domain. Exact matches are checked first, then prefix matches, and a Global rule only fires if nothing more specific matched. See Creating a Redirect for the full priority order.

Related

For domain-wide catch-alls instead of specific paths, see Global Redirects. To change or remove a rule after it's created, see Editing & Deleting Redirects.

Missing something?

If there's a feature you need that Redirect Supply doesn't have yet, we want to hear about it. Every request goes straight to the team building this.

Missing something?

If there's a feature you need that Redirect Supply doesn't have yet, we want to hear about it. Every request goes straight to the team building this.

Redirects

/

Path redirects