---
title: "corestack_url_change_preview"
url: https://docs.corefinity.com/mcp/tools/corestack_url_change_preview
type: tool
last_updated: 2026-11-13
feature: domains
related:
  - https://docs.corefinity.com/api/reference/domains/preview-site-main-domain.md
  - https://docs.corefinity.com/guides/sites/go-live/add-a-domain.md
---
# corestack_url_change_preview

**Preview a domain change.** What changing a live site's primary domain to another domain would do: the new hosts' DNS, how many references in the database would be rewritten, warnings and what blocks it now. Scope: write.

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

## When to use it

What changing a live site's primary domain to another domain would do: the new hosts' DNS, how many references in the database would be rewritten, warnings and what blocks it now.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `new_primary` (string, up to 253 characters, required): The new primary domain.
- `www` (one of `www`, `bare`): www: the site answers on www.<domain> (the bare domain redirects); bare: the other way round. Default: as new_primary is written.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "new_primary": {
      "description": "The new primary domain.",
      "maxLength": 253,
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "www": {
      "description": "www: the site answers on www.<domain> (the bare domain redirects); bare: the other way round. Default: as new_primary is written.",
      "enum": [
        "www",
        "bare"
      ],
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "new_primary"
  ],
  "type": "object"
}
```

## Refusals

- `preview_only`: the row has no domain attached yet; attach one with corestack_site_attach_domain first.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- 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_url_change_preview",
  "arguments": {
    "site_id": 4211,
    "new_primary": "example.com"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_url_change_preview with site_id 4211, new_primary example.com. (Preview a domain change.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/url-change/preview](https://docs.corefinity.com/api/reference/domains/preview-site-main-domain.md)
- Guide: [Add a domain](https://docs.corefinity.com/guides/sites/go-live/add-a-domain.md)
