How to Create RegEx Redirects in Nabu Redirect Manager?
RegEx (Regular Expressions) lets you create powerful, pattern-based redirects for your Shopify store using the Nabu Redirect Manager app. With RegEx, you can redirect multiple URLs that follow a pattern to a new destination in one step.
What is RegEx?
Regular Expressions (RegEx) are a way of defining patterns to match text. Instead of writing separate redirects for every possible product URL, RegEx allows you to set rules that match groups of URLs at once. For example, you can match all product URLs with numbers or certain keywords and redirect them to a specific page.
In the Nabu Redirect Manager app, you can use RegEx to set up redirects for your Shopify store. This is especially useful if you’re reorganizing collections, discontinuing products, or creating custom landing pages.
How to Create a RegEx Redirect?
- Open the Nabu Redirect Manager app in your Shopify admin.
- Navigate to Wildcard Redirects → RegEx Redirects.
- Click on Create RegEx Redirect.
- In the Source Path (RegEx) field, enter your RegEx pattern. Example: ^/products/(.*)$
- This matches any URL that starts with /products/ and captures everything after it.
- In the Target Link field, enter the destination URL. You can use capture groups from your RegEx here. Example: /collections/$1-redirected, $1 refers to the first capture group from your RegEx.
- (Optional) Check Expression is case insensitive if you want the rule to ignore uppercase vs. lowercase differences.
- Click Create to save your redirect.
Capture Groups in Nabu Redirect Manager
Capture groups are parts of your RegEx pattern enclosed in parentheses ( ). These groups can be referenced in the target URL using $1, $2, $3, and so on. Nabu currently supports up to 5 capture groups.
Example:
- Source Path : ^/products/(.)/(.)$
- Target Link: /collections/$1/$2-redirected
Here:
- $1 = first part after /products/
- $2 = second part after /products/
Updated on: 30/09/2025
Thank you!