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

**Change a site's domain.** Change a live site's primary domain to another domain, rewriting the old domain in its database. Preview it first with corestack_url_change_preview. Scope: write. Long-running: answers with a task.

- Scope: `write`
- Confirmation: `confirm_domain`
- Runs as a task: yes

## When to use it

Change a live site's primary domain to another domain, rewriting the old domain in its database. Preview it first with corestack_url_change_preview.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `new_primary` (string, up to 253 characters, required)
- `www` (one of `www`, `bare`): www or bare, as for the preview.
- `point_dns` (boolean): Point the new hosts at the site through the company's Cloudflare connection.
- `confirm_replacements` (boolean): With point_dns: required true when existing records would be replaced.
- `confirm_domain` (string, up to 253 characters, required): The site's current primary domain, typed exactly.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_domain": {
      "description": "The site's current primary domain, typed exactly.",
      "maxLength": 253,
      "type": "string"
    },
    "confirm_replacements": {
      "description": "With point_dns: required true when existing records would be replaced.",
      "type": "boolean"
    },
    "new_primary": {
      "maxLength": 253,
      "type": "string"
    },
    "point_dns": {
      "description": "Point the new hosts at the site through the company's Cloudflare connection.",
      "type": "boolean"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "www": {
      "description": "www or bare, as for the preview.",
      "enum": [
        "www",
        "bare"
      ],
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "new_primary",
    "confirm_domain"
  ],
  "type": "object"
}
```

## Refusals

- `not_connected`: no Cloudflare connection can write this zone; connect Cloudflare or point DNS by hand.
- `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_apply",
  "arguments": {
    "site_id": 4211,
    "new_primary": "example.com",
    "confirm_domain": "example.co.uk"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_url_change_apply with site_id 4211, new_primary example.com. (Change a site's domain.) Tell me what it returned.
```

## The same task elsewhere

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