Shopify International (formerly Shopify Markets) lets you structure your store using regional or language-specific subfolders. For example, example.com/fr for the French market.
If you discontinue one of these markets, the associated subfolder URLs can return 404 errors, which disrupts customer experience and SEO performance. You can use pattern redirects to route those broken links back to working equivalents, whether you’re retiring a market or moving it to a new domain structure.
Discontinuing a subfolder market
Let’s say you retire the French market hosted on example.com/fr-fr
. You can use a pattern redirect to send all traffic from that subfolder back to equivalent URLs on your primary market.
-
Redirect from:
/fr-fr/⑴
-
Redirect to:
/⑴
Here, ⑴
is a wildcard token that captures the rest of the URL path.
Wildcard tokens match content between slashes. Use one for each section of the URL you want to redirect. Learn how to create pattern redirects.
Switching a subfolder market to a subdomain
If you move a market from a subfolder to a subdomain (e.g. from example.com/fr-fr
to fr.example.com
), you can set up a pattern redirect like this:
-
Redirect from:
/fr-fr/⑴
-
Redirect to:
https://fr.example.com/⑴
Where ⑴ is a wildcard token and https://fr.example.com
is the new subdomain.
Wildcard tokens match content between slashes. Use one for each section of the URL you want to redirect. Learn how to create pattern redirects.
Switching a subfolder market to a secondary domain
For example, moving from example.com/fr-fr
to example-fr.com
:
-
Redirect from:
/fr-fr/⑴
-
Redirect to:
https://www.example-fr.com/⑴
Where ⑴ is a wildcard token and https://fr.example.com
is the new subdomain.
Wildcard tokens match content between slashes. Use one for each section of the URL you want to redirect. Learn how to create pattern redirects.
Want to optimise patterns for SEO too?
Pattern redirects are a fast, scalable fix but because they run in the browser using JavaScript, they don’t provide SEO benefits like permanent 301 redirects.
If you're on the Enterprise plan, you can use Pattern Matches to:
- See which broken links are actually being visited
- Convert high-traffic matches into 301 redirects