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

**Check hosts before attaching them.** Check hosts before attaching them to a site or environment: per host whether its DNS reaches the platform, what point_dns would change, and advice. Nothing is changed. Scope: read.

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

## When to use it

Check hosts before attaching them to a site or environment: per host whether its DNS reaches the platform, what point_dns would change, and advice. Nothing is changed.

`blockers` lists what refuses the attach whatever DNS says, each `{reason, message}` exactly as corestack_site_attach_domain would answer it; empty when nothing does. Today that is a WordPress production site's platform plugins: `platform_plugins_off` while they are turned off, until they are turned back on with corestack_site_platform_plugins_set (`enabled: true`); `platform_plugins_applying` while they are back on but the platform has not finished applying that, until the task that tool answered completes (if it failed, turning them on again starts it afresh). Tell the person the `message` before you attach.

`proxied_unconfirmed` lists each host Cloudflare proxies in a zone the Control Panel cannot look behind (no Cloudflare connection, or a zone it does not reach), in the order asked: `{host, confirmable, challenge_path: {ok, code, status, note}, verification: {name, value, found, state}}`; empty when there are none. Such a host stays `ok: false`, because its record was not checked. `challenge_path` is whether the certificate check gets through Cloudflare to the platform: `ok: true` it does; `ok: false` it cannot, so the host is not `confirmable` and `note` says what to change in Cloudflare; `ok: null` is advice that may not matter (a cached or blocked answer, no answer). `verification` is the proof that the person controls the host: a TXT record named `name` holding `value` (their company's value; null when this Control Panel cannot check proofs yet), `found` once it is there, and `state` one of `found`, `missing`, `unreadable` or `unavailable`. A host is `confirmable` only when its path does not block and its proof is found; the host's `problems` say what to add or change. Before you attach with `proxied_records_checked`, ask the person to add any missing TXT record and to check in Cloudflare that each record points at the host's `expected_ip`.

Magento store choices run the same checks as the attach: unknown or inactive stores and an unreadable store list are
refused before anything starts. A valid store check also returns `warnings`, such as base URLs on 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)
- `hosts` (array of string, 1–253 characters, 1–10 items, required): The hosts to attach (production row: the site's domain or its www form among them; any other row: never it). A host-migration copy made under its provider's platform host may leave that name out (it can never point here).
- `canonical` (string, 1–253 characters, required): The host the row is served on; one of hosts.
- `www` (one of `www`, `bare`): Which form the other redirects to; default from canonical.
- `aliases` (array of objects, 1 to 9): How non-canonical hosts are served on Shopware and Magento 2.
  - `host` (string, 1 to 253 characters, required): One of hosts, other than canonical, listed once.
  - `serve` (one of `redirect`, `storefront`, required)
  - `store` (Magento 2 object): `{code, type}` where type is `website` or `store`; required for storefront.
  - `base_url` (Magento 2 boolean): Choose this address for the store's base URLs; at most one per store.
- `default_store` (Magento 2 object or null): `{code, type}` for the default store, or null for Magento's default.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "aliases": {
      "description": "How non-canonical hosts are served: redirect or storefront. Magento 2: storefront needs store {code, type}; base_url chooses its base URL host.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "base_url": {
            "type": "boolean"
          },
          "host": {
            "maxLength": 253,
            "minLength": 1,
            "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"
          }
        },
        "required": [
          "host",
          "serve"
        ],
        "type": "object"
      },
      "maxItems": 9,
      "minItems": 1,
      "type": "array"
    },
    "canonical": {
      "description": "The host the row is served on; one of hosts.",
      "maxLength": 253,
      "minLength": 1,
      "type": "string"
    },
    "default_store": {
      "additionalProperties": false,
      "description": "Magento 2: the default store, or null for Magento's default.",
      "properties": {
        "code": {
          "maxLength": 32,
          "minLength": 1,
          "type": "string"
        },
        "type": {
          "enum": [
            "website",
            "store"
          ],
          "type": "string"
        }
      },
      "required": [
        "code",
        "type"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "hosts": {
      "description": "The hosts to attach (production row: the site's domain or its www form among them; any other row: never it). A host-migration copy made under its provider's platform host may leave that name out (it can never point here).",
      "items": {
        "maxLength": 253,
        "minLength": 1,
        "type": "string"
      },
      "maxItems": 10,
      "minItems": 1,
      "type": "array"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "www": {
      "description": "Which form the other redirects to; default from canonical.",
      "enum": [
        "www",
        "bare"
      ],
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "hosts",
    "canonical"
  ],
  "type": "object"
}
```

## Refusals

Store-choice refusals name `aliases.<n>.store`, where `n` is the alias's zero-based position, or `aliases` when its host
cannot be matched. Default-store refusals name `default_store`.

- `provisioning`: the site is still being created; wait for corestack_site_provisioning_get to finish.
- `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.
- `invalid_arguments` on `hosts` ("<install>.wpengine.com is WP Engine's own address, which can never point here: attach the site's own domains."): a host under a migration provider's own platform domain (`*.wpengine.com`, `*.wpenginepowered.com`, `*.cloudwaysapps.com`); the site's own domain is the one exception. Nothing is written.
- 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 missing choice. Choose a Magento website or store view for every serving alias.
- `store_unknown`: `aliases.<n>.store` or `default_store` identifies the choice. Read the stores again and choose a code Magento lists.
- `store_inactive`: `aliases.<n>.store` or `default_store` identifies the choice. Switch the store view on in Magento or choose another.
- `store_code_format`: `aliases.<n>.store` or `default_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_site_attach_domain_check",
  "arguments": {
    "site_id": 4211,
    "hosts": [
      "example.co.uk",
      "guns.example.co.uk",
      "www.guns.example.co.uk"
    ],
    "canonical": "example.co.uk",
    "aliases": [
      {
        "host": "guns.example.co.uk",
        "serve": "storefront",
        "store": {
          "code": "guns",
          "type": "website"
        },
        "base_url": true
      },
      {
        "host": "www.guns.example.co.uk",
        "serve": "storefront",
        "store": {
          "code": "guns",
          "type": "website"
        }
      }
    ],
    "default_store": {
      "code": "base",
      "type": "website"
    }
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_site_attach_domain_check with site_id 4211, hosts ["example.co.uk","guns.example.co.uk","www.guns.example.co.uk"], canonical example.co.uk, aliases [{"host":"guns.example.co.uk","serve":"storefront","store":{"code":"guns","type":"website"},"base_url":true},{"host":"www.guns.example.co.uk","serve":"storefront","store":{"code":"guns","type":"website"}}], default_store {"code":"base","type":"website"}. (Check hosts before attaching them.) Tell me what it returned.
```

## The same task elsewhere

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