Wildcard redirects let you redirect a whole group of broken URLs with a single rule. The part of the URL matched by the * can be carried over to the new URL, so every visitor lands on the matching page instead of one generic page.
The most common reason to use them is a leftover language or market folder. Translation apps, geolocation apps and Shopify Markets can all create URLs like /en-ca/products/hat, and when you remove that setup every one of those URLs breaks at once.
How to create a wildcard redirect
Open the Broken links page in TinySEO.
Click Redirect rules in the top right corner.
Click Add redirect rule.
Select Wildcard as the rule.
In URL path, enter the old path with a * where the changing part is, for example
/en-ca/*.In Redirect to, enter the new path. Add a * where the matched part should go, for example
/*.Click Save.
With this rule, /en-ca/products/hat redirects to /products/hat, /en-ca/collections/sale redirects to /collections/sale, and so on for every URL under that folder.
Examples
URL path | Redirect to | What it does |
|
| Removes a language or market folder. |
|
| Merges two language folders into one. |
|
| Renames a collection and keeps the product URLs under it. |
|
| Sends a whole removed section to one page. Every broken URL under |
Good to know
Redirect rules only apply to broken links. A wildcard rule never redirects a page that still exists. It only works when the visited URL shows a 404 page.
Redirect rules are available on the Advanced and Expert plans.
You can create up to 20 redirect rules. Delete an existing rule to add a new one.
The URL path must contain exactly one *. The redirect URL can contain one * or none. If you leave it out, every matching URL goes to the same page.
The * matches any part of the path, including slashes, so
/en-ca/*covers/en-ca/products/hatas well as/en-ca/collections/sale.If a broken URL matches more than one rule, the most specific rule wins (the one with the longest value).
The redirect URL cannot match the rule's own pattern. For example,
/a/*cannot redirect to/a/b/*, because the new URL would be redirected again and again.Only path characters are allowed. Query parameters (?, =, &, #) are not supported.
If you enter a full URL in Redirect to, for example
https://your-store.com/products/hat, only its path (/products/hat) is saved.If the new URL does not exist either, it is treated as a separate broken link and follows your other rules or your default redirect settings.
Automatic broken link redirects must be enabled for rules to work. You can turn them on in Redirect rules > Settings.
To redirect only the links that match a rule, turn on Only redirect links that match a rule in Redirect rules > Settings. Broken links that don't match any rule then stay on the 404 page instead of going to your default redirect URL.
What happens after a rule matches
The first visitor who lands on a matching broken URL is redirected instantly. Shortly after, TinySEO creates a permanent redirect for that exact URL in your Shopify store, so search engines and future visitors are redirected by Shopify directly.
If you have any questions, contact us through the live chat and we will be happy to help.
