> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scayla.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use redirect rules for discontinued markets

> When you discontinue a Shopify market, use redirect rules to send visitors from market-specific URLs to your primary store. This prevents 404 errors and maintains a good customer experience.

## What happens when you close a market

When you discontinue a Shopify market:

* Market-specific URLs (e.g., `/en-us/products/shirt`) stop working
* Visitors get 404 errors when accessing these URLs
* You lose potential customers who land on broken pages

Redirect rules solve this by automatically redirecting market URLs to equivalent pages on your primary store.

## Common market URL patterns

Shopify markets typically use these URL structures:

**Subdomain-based:**

* `us.yourstore.com/products/shirt`
* `uk.yourstore.com/collections/sale`

**Path-based:**

* `yourstore.com/en-us/products/shirt`
* `yourstore.com/en-gb/collections/sale`

<Info>
  Redirect rules work for **path-based** market URLs. For subdomain-based markets, you'll need to configure redirects at your domain DNS level.
</Info>

## Create a market redirect rule

<Steps>
  <Step title="Identify your market URL structure">
    Before creating the rule, determine the pattern used by your discontinued market.

    **Example:**

    * `/en-us/*` (US market with English locale)
  </Step>

  <Step title="Open Redirect Pro">
    From your Shopify admin, open the **Redirect Pro** app.
  </Step>

  <Step title="Go to Redirect Rules">
    Click **Redirect rules** in the app navigation menu.
  </Step>

  <Step title="Click Create redirect rule">
    Click the **Create redirect rule** button.
  </Step>

  <Step title="Enter the market URL pattern">
    In the **Redirect from** field, enter the market URL pattern using wildcards.

    **Example for US market**: `/en-us/products/⑴`

    This matches all URLs that start with `/en-us/products/`
  </Step>

  <Step title="Enter the primary store destination">
    In the **Redirect to** field, specify where to send visitors.

    **Example 1 - Preserve the path**:
    `/products/⑴` (sends `/en-us/products/shirt` → `/products/shirt`)

    **Example 2 - Send to homepage**:
    `/` (sends all market URLs to homepage)
  </Step>

  <Step title="Save the rule">
    Click **Save** in the contextual save bar at the top of the page. The redirect rule is now active for the discontinued market.

    You can create additional rules to capture other patterns like collection pages and blog posts.
  </Step>
</Steps>

## Redirect pattern examples

### Single market, broad pattern

**Scenario**: US market used `/en-us/` prefix. One rule captures all paths (products, collections, pages, etc.).

**Rule:**

* Redirect from: `/en-us/⑴/⑵`
* Redirect to: `/⑴/⑵`

**Result:**

* `/en-us/products/shirt` → `/products/shirt`
* `/en-us/collections/sale` → `/collections/sale`
* `/en-us/pages/about` → `/pages/about`

**Pros**: One rule handles everything\
**Cons**: Harder to track analytics by content type

### Single market, specific patterns

**Scenario**: US market used `/en-us/` prefix. Create separate rules for products, collections, etc.

**Rule 1 (Products):**

* Redirect from: `/en-us/products/⑴`
* Redirect to: `/products/⑴`

**Rule 2 (Collections):**

* Redirect from: `/en-us/collections/⑴`
* Redirect to: `/collections/⑴`

**Rule 3 (Pages):**

* Redirect from: `/en-us/pages/⑴`
* Redirect to: `/pages/⑴`

**Pros**: Easier to track analytics per content type\
**Cons**: More rules to manage

<Tip>
  **Recommended approach**: Use specific patterns (separate rules for products, collections, etc.) for better analytics and easier troubleshooting. You can see exactly which content types are getting traffic.
</Tip>

### Multiple markets, one rule per market

**Scenario**: Closed US and Canada markets with `/en-us/` and `/en-ca/` prefixes.

**Rule 1 (US market):**

* Redirect from: `/en-us/⑴/⑵`
* Redirect to: `/⑴/⑵`

**Rule 2 (Canada market):**

* Redirect from: `/en-ca/⑴/⑵`
* Redirect to: `/⑴/⑵`

<Warning>
  While you could use a wildcard token to replace `en-us` for multiple market closures, this rule would be very broad and pick up other 404 pages accidentally.
</Warning>

### Redirect to subdomain or secondary domain

**Scenario**: US market moved from `/en-us/` path to `us.yourstore.com` subdomain.

**Rule:**

* Redirect from: `/en-us/⑴/⑵`
* Redirect to: `https://us.yourstore.com/⑴/⑵`

**Result:**

* `/en-us/products/shirt` → `https://us.yourstore.com/products/shirt`

Or redirect to a completely different domain:

**Rule:**

* Redirect from: `/en-us/⑴/⑵`
* Redirect to: `https://us-store.com/⑴/⑵`

<Note>
  When redirecting to external domains or subdomains, always include the full URL with `https://` in the "Redirect to" field.
</Note>

<Tip>
  See [Test redirect rules](/redirect-pro/guides/working-with-redirect-rules/test-redirect-rules) for detailed testing guidance.
</Tip>

## After discontinuing the market

Once the market is closed and your rules are live, **Enterprise users** can optimize their redirects:

[View rule matches](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) to see which discontinued market URLs are getting high traffic, then [convert high-traffic URLs to 301 redirects](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) for SEO benefits and faster redirects.

## Related guides

* [Create a redirect rule](/redirect-pro/guides/working-with-redirect-rules/create-redirect-rule) - Detailed rule creation steps
* [Test redirect rules](/redirect-pro/guides/working-with-redirect-rules/test-redirect-rules) - Verify market redirects work
* [View and manage rule matches](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) - Monitor market redirect usage (Enterprise)
* [Convert matches to permanent redirects](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) - Optimize high-traffic market URLs

## Need help?

Questions about setting up market redirects?

* [Contact support](/redirect-pro/help/support/contact-support) - Get personalized guidance for your market structure
