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

# Test redirect rules

> Verify your redirect rules are matching broken URLs correctly and redirecting to the right destination.

After [creating a redirect rule](/redirect-pro/guides/working-with-redirect-rules/create-redirect-rule), test it to ensure the pattern matches the right URLs and redirects visitors to the correct destination.

<Warning>
  **Redirect rules only work on broken links.** The "Redirect from" URL must lead to a 404 error page for a rule to trigger. Redirect rules cannot redirect from active pages on your store.
</Warning>

## Test your redirect rule

The best way to test a redirect rule is to visit a URL that matches your "Redirect from" pattern.

<Steps>
  <Step title="Identify a test URL">
    Choose a URL that matches your "Redirect from" pattern and currently shows a 404 error.

    **Example**: If your rule is `/products/⑴`, test with a broken link like `https://yourstore.com/products/shirt`
  </Step>

  <Step title="Visit the test URL">
    Paste the full URL into the address bar and press Enter.
  </Step>

  <Step title="Verify the redirect">
    You should see:

    * A brief flash of the 404 page (this is normal)
    * Automatic redirect to your "Redirect to" destination
    * The correct page loads with wildcard token content preserved
  </Step>
</Steps>

## Understanding the redirect delay

You may notice a split-second delay where the 404 page flashes before redirecting. This is expected behavior.

**Why the delay happens:**

* Redirect rules use JavaScript that runs in the browser rather than 301 redirects
* The browser must load the 404 page first, then execute the redirect
* This creates a brief visible delay

**How to minimize the delay:**

1. **Browser caching**: After the first visit, the browser caches the redirect and subsequent visits are much faster.
2. **Convert to 301 redirects (Enterprise)**: For high-traffic URLs, use [rule matches](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) to identify frequently-accessed URLs and [convert them to 301 redirects](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches). This eliminates the delay entirely and provides SEO benefits.

<Info>
  301 redirects happen before the page loads, so there's no visible delay. Consider converting your most-visited URLs to 301s for a better user experience.
</Info>

## What to test

### Verify rule matching

Test URLs that **should** match:

**Rule**: Redirect from `/blog/old-posts/⑴`

**Test these** (should redirect):

* `/blog/old-posts/announcement` ✓
* `/blog/old-posts/update-2023` ✓

### Verify wildcard tokens

If using multiple tokens, confirm they capture correctly:

**Rule**:

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

**Test**: Visit `/blog/2024/category/updates`

* Should redirect to: `/news/2024/updates`
* Verify both "2024" and "updates" appear in the destination

## Common issues

<AccordionGroup>
  <Accordion title="Rule not redirecting at all">
    **Possible causes:**

    * App embed not activated in theme editor
    * Usage quota limit reached
    * "Redirect from" URL doesn't actually show a 404 error (page is active)
    * Pattern doesn't match the URL being tested

    **Fix**: See [Redirect rule not working](/redirect-pro/help/redirect-rule-issues/redirect-rule-not-working) for troubleshooting steps.
  </Accordion>

  <Accordion title="Redirects to wrong destination">
    **Possible causes:**

    * Wildcard tokens in wrong order in "Redirect to" field
    * Wrong destination URL configured

    **Fix**: [Edit the rule](/redirect-pro/guides/working-with-redirect-rules/edit-delete-redirect-rules) and verify your wildcard token positions.
  </Accordion>
</AccordionGroup>

## Related guides

* [Create a redirect rule](/redirect-pro/guides/working-with-redirect-rules/create-redirect-rule) - Set up rules to test
* [Edit or delete redirect rules](/redirect-pro/guides/working-with-redirect-rules/edit-delete-redirect-rules) - Fix issues found during testing
* [View and manage rule matches](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) - Monitor real usage (Enterprise)
* [Convert matches to permanent redirects](/redirect-pro/guides/working-with-redirect-rules/view-manage-rule-matches) - Eliminate redirect delays (Enterprise)

## Need help?

If your rule isn't working as expected during testing:

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