> ## 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.

# Create a redirect rule

## Choose your approach

You can create redirect rules in two ways:

**Create from template** - Use pre-built patterns for common scenarios (quickest option)

**Create custom rule** - Build your own pattern with wildcard tokens (most flexible)

<Info>
  Not sure which to use? Start with templates - they cover most common use cases. Use custom rules only when you need specific URL matching that templates don't provide.
</Info>

## Create a redirect rule

<Steps>
  <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 your Redirect from URL">
    You can click **Use template** to start from the most common use cases, or enter a custom **Redirect from** URL. Use a least one wildcard token:

    * Use `⑴` to match any characters
    * Example: `/products/⑴` matches `/products/shoes`

    <Tip>
      Start broad (e.g., `/products/⑴`) then narrow down if needed. Test with specific URLs to verify your pattern works.
    </Tip>
  </Step>

  <Step title="Enter your Redirect to URL">
    In the **Redirect to** field, specify where matched URLs should go:

    * Use fixed paths: `/new-path/page`, or,
    * Use wildcard tokens to create flexible destination URLs based on the visited **Redirect from** URL: `/new-path/⑴`
  </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 and will start redirecting relevant traffic immediately.
  </Step>
</Steps>

## Understanding wildcard tokens

### Wildcard tokens: `⑴` `⑵` `⑶` `⑷` `⑸`

Wildcard tokens match any set characters in a URL **between two forward slashes**. You can use up to 5 tokens per rule, numbered `⑴` through `⑸`.

**Examples:**

| Pattern        | Matches                                  | Doesn't Match                              |
| -------------- | ---------------------------------------- | ------------------------------------------ |
| `/old/⑴`       | `/old/page`<br />`/old/anything`         | `/new/page`<br />`/old` (no trailing path) |
| `/blog/⑴/post` | `/blog/2024/post`<br />`/blog/news/post` | `/blog/post`<br />`/blog/2024/article`     |
| `/⑴-sale`      | `/winter-sale`<br />`/summer-sale`       | `/sale`<br />`/discounts`                  |

### Reusing tokens in the destination

Wildcard tokens capture text from the matched URL and can be reused in the redirect destination.

**Single token example:**

**Rule:**

* Match: `/products-old/⑴`
* Redirect to: `/products/⑴`

**Result:**

* `/products-old/shirt` → `/products/shirt`
* `/products-old/blue-jeans` → `/products/blue-jeans`

**Multiple tokens example:**

**Rule:**

* Match: `/blog/⑴/category/⑵`
* Redirect to: `/news/⑴/⑵`

**Result:**

* `/blog/2024/category/updates` → `/news/2024/updates`
* `⑴` captures "2024", `⑵` captures "updates"

## Common redirect rules

<AccordionGroup>
  <Accordion title="Redirect discontinued products">
    **Scenario**: Unpublished or deleted products URLs to the all products page.

    **Rule**:

    * Redirect from: `/products/⑴`
    * Redirect to: `/collections/all`
  </Accordion>

  <Accordion title="Redirect discontinued collections">
    **Scenario**: Unpublished or deleted collection paths to the all products page.

    **Rule**:

    * Redirect from: `/collections/⑴`
    * Redirect to: `/collections/all`
  </Accordion>

  <Accordion title="Redirect locale-specific URLs">
    **Scenario**: Moved from `/en/page` structure to `/page`

    **Rule**:

    * Redirect from: `/en/⑴`
    * Redirect to: `/⑴`
  </Accordion>
</AccordionGroup>

## Rule matching behavior

**Important things to know:**

* **301s take priority** - If a URL matches both a rule and a 301 redirect, the 301 will be used
* **5 token maximum** - You can use tokens `⑴` `⑵` `⑶` `⑷` `⑸` (no more than 5 per rule)

<Warning>
  Always test your redirect rule after creation to ensure it matches the URLs you expect. See [Test redirect rules](/redirect-pro/guides/working-with-redirect-rules/test-redirect-rules).
</Warning>

## After creating a rule

Once your redirect rule is saved:

**Immediate effects:**

* Rule starts matching URLs right away
* Visitors are redirected automatically
* Each activation counts toward your monthly tracked visits quota

**Things to monitor:**

* Test with sample URLs to verify correct matching
* Check [rule matches](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) (Enterprise) to see actual triggered URLs
* Monitor your [usage quota](/redirect-pro/guides/account-and-settings/usage-quotas) if you expect high traffic

## Troubleshooting

**Rule not redirecting?**

Check these common issues:

* **App embed disabled**: Redirect rules require the app embed to be activated in your theme editor. Go to **Theme Editor → App Embeds** and enable Redirect Pro.
* **Quota limit reached**: If you've used your monthly tracked visits, redirect rules pause until your quota resets. Check usage on the Settings page or [upgrade your plan](/redirect-pro/guides/account-and-settings/manage-subscription).
* **Pattern mismatch**: Verify your test URL matches the URL structure from your rule. See [Redirect rule not working](/redirect-pro/help/redirect-rule-issues/redirect-rule-not-working).

## Related guides

* [Understanding redirect rules](/redirect-pro/guides/working-with-redirect-rules/redirect-rules-overview) - Learn how rules work
* [Test redirect rules](/redirect-pro/guides/working-with-redirect-rules/test-redirect-rules) - Verify your rules
* [Edit or delete redirect rules](/redirect-pro/guides/working-with-redirect-rules/edit-delete-redirect-rules) - Manage rules
* [View and manage rule matches](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) - See triggered URLs (Enterprise)

## Need help?

Having trouble creating a redirect rule? Check these resources:

* [Redirect rule not working](/redirect-pro/help/redirect-rule-issues/redirect-rule-not-working) - Common issues
* [Contact support](/redirect-pro/help/support/contact-support) - Get personalized help
