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

**Change a site's aliases.** Set a site's aliases and whether search engines may index it, at the version from corestack_domains_get. Aliases redirect to the primary address or show their own storefront where supported. Scope: write. Long-running: answers with a task.

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

## When to use it

Set a site's aliases and whether search engines may index it, at the version from corestack_domains_get. Aliases redirect to the primary address, or show their own storefront on Shopware and Magento 2. A Magento serving alias names its website or store view, or uses null to show the default store. Its base URLs move automatically only from the site's own addresses; point_base_urls explicitly permits a move from another address.

After the store change completes and before changing DNS:

Request `/` with `corestack_site_smoke_test`, setting `host` to the store domain. The final URL must be on that
store's `base_url` host from `corestack_site_magento_stores_list` (the domain itself, or its bare or `www` form
when the base URL uses it), and the title must be that store's. Magento redirects to the store's base URL; a
redirect to any other host means its base URL points elsewhere.
GraphQL picks its store from the `Store` header, so it cannot prove a domain's store.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `version` (integer, ≥ 0, required): The set's version from corestack_domains_get.
- `aliases` (array, up to 9, required): Every alias to keep; omitted ones are removed. A host string or an object on Shopware and Magento 2.
  - `host` (string, up to 253 characters, required)
  - `serve` (one of `redirect`, `storefront`, default redirect)
  - `store` (Magento 2 object or null): `{code, type}` where type is `website` or `store`; null shows the default store with no host mapping. Required for a new storefront alias; omitted on an existing storefront keeps its mapping. Send null for an unmapped alias, never the read's null code/type object.
  - `base_url` (Magento 2 boolean): Choose this address for the selected store's base URLs. At most one per store.
- `noindex` (boolean, required)
- `point_base_urls` (Magento 2 array of host strings, up to 9): Explicitly move these stores' base URLs from any address. Each host must have a store choice in aliases; at most one per store. Otherwise only values on the site's own addresses move.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "aliases": {
      "description": "All aliases to keep; omitted ones are removed. A host string, or on Magento 2 {host, serve, store: {code, type: website|store}|null, base_url?}; null shows the default store, base_url chooses its address.",
      "items": {
        "anyOf": [
          {
            "maxLength": 253,
            "type": "string"
          },
          {
            "additionalProperties": false,
            "properties": {
              "base_url": {
                "type": "boolean"
              },
              "host": {
                "maxLength": 253,
                "type": "string"
              },
              "serve": {
                "enum": [
                  "redirect",
                  "storefront"
                ],
                "type": "string"
              },
              "store": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "maxLength": 32,
                    "minLength": 1,
                    "type": "string"
                  },
                  "type": {
                    "enum": [
                      "website",
                      "store"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "type"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "host"
            ],
            "type": "object"
          }
        ]
      },
      "maxItems": 9,
      "type": "array"
    },
    "noindex": {
      "type": "boolean"
    },
    "point_base_urls": {
      "description": "Store hosts whose base URLs may move from any address.",
      "items": {
        "maxLength": 253,
        "type": "string"
      },
      "maxItems": 9,
      "type": "array"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "version": {
      "description": "The set's version from corestack_domains_get.",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "version",
    "aliases",
    "noindex"
  ],
  "type": "object"
}
```

## Refusals

- `busy`: another change is running on this row; wait for it (corestack_site_operation_get) and call again.
- `stale`: the object changed since you read it; read it again and call with the new version.
- `maintenance`: the site is in maintenance mode; turn it off first, or wait for the maintenance to end.
- `preview_only`: the row has no domain attached yet; attach one with corestack_site_attach_domain first.
- `domains_locked`: the domains are locked by Corefinity's team for this row; contact support.
- `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).

- `store_hosts`: the site has platform store addresses managed by staff; contact support.
- `store_required`: `aliases.<n>.store` identifies the choice. Give a new serving alias a store choice, or null to show the default store.
- `store_unknown`: `aliases.<n>.store` identifies the choice. Read the stores again and choose a code Magento lists.
- `store_inactive`: `aliases.<n>.store` identifies the choice. Switch the store view on in Magento or choose another.
- `store_code_format`: `aliases.<n>.store` identifies the choice. Use a Magento code with lower-case letters, digits or underscores, up to 32 characters.
- `store_host_not_served`: first add the address as an alias that shows its own store.
- `store_mapping_foreign`: the store rules are managed outside the Control Panel; contact support.
- `store_mapping_unreadable`: the existing store rules cannot be read safely; contact support.
- `nginx_rules_not_adopted`: the site's rules are not ready for this change; contact support.
- `nginx_rules_locked`: the site's rules are locked; contact support.
- `nginx_invalid`: the site's existing rules need attention before the store can be changed.
- `upstream_unavailable`: Magento's stores could not be read; try again in a moment.

## Example

```json
{
  "name": "corestack_domains_update",
  "arguments": {
    "site_id": 4211,
    "version": 3,
    "aliases": [
      "www.example.co.uk",
      {
        "host": "guns.example.co.uk",
        "serve": "storefront",
        "store": {
          "code": "guns",
          "type": "website"
        },
        "base_url": true
      }
    ],
    "noindex": false
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_domains_update with site_id 4211, version 3, aliases ["www.example.co.uk",{"host":"guns.example.co.uk","serve":"storefront","store":{"code":"guns","type":"website"},"base_url":true}], noindex false. (Change a site's aliases.) Tell me what it returned.
```

## The same task elsewhere

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