---
title: "corestack_redirects_test"
url: https://docs.corefinity.com/mcp/tools/corestack_redirects_test
type: tool
last_updated: 2026-11-13
feature: redirects
related:
  - https://docs.corefinity.com/api/reference/site-settings/test-site-redirect.md
  - https://docs.corefinity.com/guides/sites/site-settings/redirects.md
---
# corestack_redirects_test

**Test a redirect.** Try an address against a row's redirects — the saved table, or one you have not saved yet — and see which rule matches, where it goes and the whole chain. Scope: read.

- Scope: `read`
- Runs as a task: no

## When to use it

Try an address against a row's redirects — the saved table, or one you have not saved yet — and see which rule matches, where it goes and the whole chain.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `url` (string, up to 4096 characters, required): A path such as /old-page, or a full address on the site.
- `host` (string, up to 253 characters, or null): One of the row's domains to make the request on (rules limited to it run first); by default the primary. A full address in `url` names its own.
- `rules` (array of objects, up to 2000 items): An unsaved table, in corestack_redirects_update's rule shape; absent tests the saved one.
  - `id` (integer, or null, ≥ 1): An existing rule's id; leave it out (or null) for a new rule.
  - `type` (one of `exact`, `prefix`, `regex`, required)
  - `from` (string, up to 2000 characters, required)
  - `to` (string, up to 2000 characters, required)
  - `status` (one of `301`, `302`, required)
  - `keep_query` (boolean, required)
  - `enabled` (boolean, required)
  - `note` (string, or null, up to 120 characters)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "host": {
      "description": "One of the row's domains to make the request on (rules limited to it run first); by default the primary. A full address in url names its own.",
      "maxLength": 253,
      "type": [
        "string",
        "null"
      ]
    },
    "rules": {
      "description": "An unsaved table, in corestack_redirects_update's rule shape; absent tests the saved one.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "from": {
            "maxLength": 2000,
            "type": "string"
          },
          "hosts": {
            "description": "CPPB-1170: limit the rule to some of the row's own domains (corestack_redirects_get's available_hosts); null runs it on every domain. Left out on a saved rule, the rule keeps the domains it has. On its domains a limited rule runs before the every-domain rules, and never on the platform's reserved paths.",
            "items": {
              "maxLength": 253,
              "type": "string"
            },
            "minItems": 1,
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "description": "An existing rule's id; leave it out (or null) for a new rule.",
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "keep_query": {
            "type": "boolean"
          },
          "note": {
            "maxLength": 120,
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              301,
              302
            ],
            "type": "integer"
          },
          "to": {
            "maxLength": 2000,
            "type": "string"
          },
          "type": {
            "enum": [
              "exact",
              "prefix",
              "regex"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "from",
          "to",
          "status",
          "keep_query",
          "enabled"
        ],
        "type": "object"
      },
      "maxItems": 2000,
      "type": [
        "array",
        "null"
      ]
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "url": {
      "description": "A path such as /old-page, or a full address on the site.",
      "maxLength": 4096,
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "url"
  ],
  "type": "object"
}
```

## Refusals

- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_redirects_test",
  "arguments": {
    "site_id": 4211,
    "url": "https://example.co.uk/"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_redirects_test with site_id 4211, url https://example.co.uk/. (Test a redirect.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/redirects/test](https://docs.corefinity.com/api/reference/site-settings/test-site-redirect.md)
- Guide: [Redirects](https://docs.corefinity.com/guides/sites/site-settings/redirects.md)
