
How to create a redirects pattern?
Redirects are essential for maintaining SEO and a smooth customer experience—especially during site changes, product removals, or URL restructuring. SM Quick Redirects & 404s makes this process faster and more automated through smart rules, bulk tools, and live 404 detection.
Here's a detailed guide on how to create redirect patterns using the Quick Redirects & 404 Shopify app:
Step 1: Access the Quick Redirects & 404 App
- Log in to your Shopify Admin panel.
- Navigate to Apps from the left sidebar.
- Click on Quick Redirects & 404 to open the app dashboard.
Step 2: Create a Redirect Pattern
- From the app dashboard, click on the Create Redirect button.
- Select the Pattern Redirect option.
Wildcard Pattern
Wildcard patterns are simple and convenient to use. They utilize the * character to represent any sequence of text. For instance, a rule using the pattern:
Product redirect pattern
Redirect From: /products/*-old
Redirect To: /products
Example:
Redirect From: /products/test-old
Redirect To: /products
Collection redirect pattern
Redirect From: /collections/*/archive
Redirect To: /collections/all
Example:
Redirect From: /collections/summer-sale/archive
Redirect To: /collections/summer-sale
Blog redirect pattern
Redirect From: /blogs/old-news/*
Redirect To: /blogs/news/$1
Example:
Redirect From: /blogs/old-news/sale-updates-2025
Redirect To: /blogs/news/sale-updates-2025
Regex Pattern
Regex patterns in Shopify redirects allow you to match and redirect URLs using flexible expressions like:
Redirect From: /collections/(.*)/products/(.*)
Redirect To: /collections/$1
Example:
Redirect From:/collections/summer-sale/products/test-product
Redirect To: /collections/$1
Advance regex pattern
Redirect From: /\/(testing\/.*)$/i
Redirect To: /products/$1
Example:
Redirect From: /testing/product-handle
Redirect To: /products/product-handle
This pattern redirects anything starting with /testing/ to a matching URL under /products/, preserving the path after /testing/.
Step 3: Save and Activate the Redirect
- Click Save Redirect to apply the pattern.
- Confirm the redirect appears in the Redirect List.
Step 4: Test Your Redirect
- Open your Shopify store and visit a URL matching the redirect pattern.
- Ensure the URL redirects correctly to the new destination.
Examples of More Redirect Patterns
-
Redirect all old product pages to a new collection:
- From: /products/*
- To: /collections/all
-
Redirect discontinued items to a general category:
- From: /collections/clearance/*
- To: /collections/discounted
-
Redirect blog articles with dynamic slugs:
- From: /blogs/news/*
- To: /blogs/latest/{{ wildcard }}