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

**Set a site's Cloudflare zone.** Choose which of your company's Cloudflare zones a row uses: automatic (matched by its hosts), one zone you name, or off. Scope: write.

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

## When to use it

Choose which of your company's Cloudflare zones a row uses: automatic (matched by its hosts), one zone you name, or off.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `mode` (one of `auto`, `manual`, `off`, required)
- `zone_id` (string, or null, up to 64 characters): The Cloudflare zone id; required with manual (corestack_company_cloudflare_get lists them).

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "mode": {
      "enum": [
        "auto",
        "manual",
        "off"
      ],
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "zone_id": {
      "description": "The Cloudflare zone id; required with manual (corestack_company_cloudflare_get lists them).",
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "site_id",
    "mode"
  ],
  "type": "object"
}
```

## Refusals

- `deleted`: the site is deleted (in its grace period); restore it with corestack_site_restore_deleted first.
- `provisioning`: the site is still being created; wait for corestack_site_provisioning_get to finish.
- `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_site_cloudflare_zone_set",
  "arguments": {
    "site_id": 4211,
    "mode": "auto"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_site_cloudflare_zone_set with site_id 4211, mode auto. (Set a site's Cloudflare zone.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [PUT /api/corestack/sites/{site}/cloudflare-zone](https://docs.corefinity.com/api/reference/domains/update-site-cloudflare-zone.md)
- Guide: [Cloudflare for a site](https://docs.corefinity.com/guides/sites/go-live/cloudflare-for-a-site.md)
