Shopify Wildcard Redirect Guide with Redirect Ninja

How Shopify wildcard redirects work: the asterisk syntax, how to test a rule before it goes live, and where patterns stop covering your broken URLs.

Jeff Edmondson

Tuesday, November 24, 2026

Short answer

Shopify does not support wildcard redirects natively. The built-in redirect tool creates one redirect at a time. To redirect many URLs that share a pattern, you need an app that can match the pattern and write the redirects for you.

Make sure to download Redirect Ninja - Easy 404 Fix and install it on your Shopify store.

What Are Wildcard Redirects & Why Use Them?

When you manage a Shopify store you spend a lot of time handling URL changes. A wildcard matches many URLs that share the same shape, so one rule covers all of them instead of you writing a redirect for every broken link.

It matters most after a URL structure change or when a collection is archived. Instead of creating dozens, hundreds or even thousands of redirects by hand, you write one rule and it handles everything that matches.

Who this is for

  • Stores watching a growing number of 404s in Google Search Console
  • Large or frequently changing product catalogues
  • Stores that migrated from another platform: BigCommerce, WooCommerce, Magento or Squarespace

When wildcard redirects are worth using

Only when several broken URLs share a clear pattern:

  • A migration where the old URL structure no longer exists
  • Renamed collections or reorganised product paths
  • Discontinued or legacy product URLs being cleaned up
  • Large batches of 404s that would otherwise each need a manual redirect

For a handful of broken links a manual redirect is fine. The value shows up at scale.

Option 1 — Shopify's native redirects (manual)

  1. Open Shopify admin
  2. Go to Content → Menus → URL redirects
  3. Add one redirect, for one URL
Shopify's native URL redirect screen

Limitations

  • No wildcard or pattern matching
  • One redirect at a time
  • Not practical once broken links run into the hundreds

How to Set Up Shopify Wildcard Redirects

Basic Syntax

Wildcard rules in Redirect Ninja use an asterisk (*) as a placeholder that can match any run of characters inside a URL path segment.

You can now use multiple wildcards anywhere in a pattern, which is a change from the earlier version.

Valid examples:

  • /products/* matches any URL that starts with "/products/" followed by anything
  • /collections/*/products/* matches products in any collection
  • /blog/*-news matches any blog post with a URL ending in "-news"
  • /sale-* matches any URL path starting with "sale-"

Pattern Matching Rules

The rules for wildcard patterns in Redirect Ninja:

  1. Wildcards (*) can be placed anywhere in the pattern
  2. A single pattern can hold more than one wildcard
  3. Each wildcard matches any characters except slashes, within one path segment
  4. Two wildcards in a row (**) are not allowed
  5. Wildcards apply to the path only, not to query parameters

So the pattern /collections/*/products/* matches:

  • /collections/summer/products/sunglasses
  • /collections/winter/products/hats

and does not match /collections/summer/best/products/sunglasses, because a wildcard will not cross a slash.

Using Wildcards in "From" and "To" URLs

Redirect Ninja lets you use wildcards in both the "From" and the "To" pattern, which is where most of the flexibility comes from.

Flexible wildcard options

There are two ways to use them.

Fixed destination. Wildcards in the "From" pattern only, with a static "To" URL.

  • From: /old-products/*
  • To: /collections/all
  • Every matching URL goes to one place

Dynamic. Wildcards in both patterns, so part of the original URL is preserved.

  • From: /old-products/*
  • To: /products/*
  • The product handle carries across

Capturing and preserving URL parts

Each wildcard in the "From" pattern captures a piece of the URL, and that piece is dropped into the matching position in the "To" pattern.

  • From: /old-site/products/*
  • To: /products/*

The wildcard captures the product name, so /old-site/products/blue-shirt redirects to /products/blue-shirt.

Multiple wildcards and pattern matching

With more than one wildcard, Redirect Ninja matches them in order. The first wildcard in the "From" pattern lines up with the first in the "To" pattern, and so on.

  • From: /collections/*/products/*-old
  • To: /collections/*/products/*-new

The first wildcard takes the collection name and the second takes the product name without the "-old" suffix, so /collections/summer/products/sunglasses-old goes to /collections/summer/products/sunglasses-new.

Important limitations

  • Wildcards only match within a path segment, between slashes
  • Each wildcard captures only the characters in its own segment
  • A wildcard will not match across slashes
  • Query parameters, everything after the ?, are not part of wildcard matching

Testing Your Wildcard Rules

Redirect Ninja includes a Wildcard Testing Tool, which is the part worth using before any rule goes live.

Redirect Ninja Wildcard Redirect Testing Tool

How to use the testing tool

  1. Open the Wildcards section in your Redirect Ninja dashboard
  2. Scroll down to the "Test Your Wildcard Rules" card
  3. Enter the URL you want to test
  4. Click "Test URL"

What it tells you

  • Whether the URL matches any of your rules
  • Which rule it matched
  • Exactly where it would redirect to
  • Why a URL is not matching when you expected it to

That last one is the useful one. It is also how you check for conflicts when two rules could both match, and which of them wins.

Redirect precedence order

When a 404 occurs, Redirect Ninja checks in this order:

  1. Normal (exact match) redirects. The exact URL path. Highest priority, checked first.
  2. Wildcard redirects. Checked if nothing exact matched. A more specific pattern, meaning fewer wildcards, beats a broader one.
  3. Automatic redirects. Checked last, used by the live redirect feature, and sends unmatched 404s to a page you nominate.

Common mistakes to avoid

  • Overlapping rules whose priority you have not checked
  • Sending everything to the homepage, which flattens the SEO value
  • Switching a rule on without testing it against sample URLs
  • Creating a loop or a chain, where a redirect lands on another redirect

Fastest path vs manual path

Fastest: an app that handles the matching, the testing and the redirect creation.

Manual: one redirect at a time, managed by hand.

Common Shopify Wildcard Redirect Use Cases

Platform migration examples

  1. BigCommerce to Shopify
    • From: /shop/products/*.html
    • To: /products/*
    • Old BigCommerce product URLs ending in .html, pointed at Shopify's cleaner structure
  2. WooCommerce to Shopify
    • From: /product-category/*/*
    • To: /collections/*-*
    • Nested WooCommerce category pages onto combined Shopify collections
  3. Magento to Shopify
    • From: /catalog/product/view/id/*
    • To: /products/*
    • Magento's numeric ID URLs onto Shopify's handle-based ones

URL structure changes

  1. Rebranding product lines
    • From: /products/old-brand-*
    • To: /products/new-brand-*
  2. Consolidating seasonal collections
    • From: /collections/*-2022
    • To: /collections/archive-*
  3. Reorganising blog categories
    • From: /blogs/news/*-tips
    • To: /blogs/tips/*

What Changes When the Breakage Stops Fitting a Pattern

A handful of wildcards is enough for a clean break: one folder moved, one prefix changed, and you are finished. At 300 dead URLs the shapes stop agreeing. A pattern covers a group, and it cannot describe a one-off URL.

Redirect Ninja reads Search Console for the traffic each dead URL was getting, then matches the ones a rule cannot reach to the closest live page.

Wildcards cover the URLs that share a pattern. The ones that don't are the ones quietly returning 404s. Find the broken URLs a pattern can't cover.

FAQ

Does Shopify support wildcard redirects by default?

No. Shopify only supports one-to-one URL redirects out of the box.

Are wildcard redirects good for SEO?

Yes, used properly. A 301 passes on link equity and keeps visitors off dead pages. They are the wrong tool for URLs that share no pattern.

Do wildcard redirects create 301 redirects?

On every request after the first. The first hit is handled on the storefront before the permanent redirect exists, so a wildcard is not an instant server-side 301.

Should I use a wildcard redirect for every redirect?

No. Only where several URLs share a clear, consistent pattern.

Need help with wildcard rules? Contact support through the chat widget in your Redirect Ninja dashboard.

Wildcard rules fix the URLs you can predict. The questions shoppers ask on the product page are the half a redirect can't reach — FAQ Ninja writes those answers from your product data, with the FAQ schema to match.