CorefinityCorefinityDocs
Open the Control PanelControl Panel
Domains · 4 of 8

Replace a site's extra domains

Replaces the list of extra domains and sets whether search engines are asked not to index the site. Send the version you last read; a save that changes something answers the operation to follow.

PUT/api/corestack/sites/{site}/domains

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Body

aliasesarray of strings or objectsRequired

The complete list of extra domains to keep, each once and never the main domain. A plain hostname redirects to the primary; the object form chooses a redirect or a storefront. A site has at most 10 hostnames in total. Up to 9 items.

Fields of an item given as an object
base_urlboolean

Choose this address for the store's base URLs, at most one address per website or store view.

hoststringRequired
servestring

Defaults to redirect. A Shopware storefront serves its sales channel; a Magento 2 storefront uses store.

redirectstorefront
storeobject or any or null

Magento 2 storefront aliases only. Required for a new storefront alias; omitted on an existing storefront alias, its mapping is kept. Null shows the default store. A redirect cannot carry a store choice.

noindexbooleanRequired

True to ask search engines not to index the site.

point_base_urlsarray of strings

Magento 2 only. Optional hosts whose stores' base URLs are moved here, even from another host. Each must be the primary address or a storefront alias with a Magento store, with at most one address per website or store view. Up to 10 items.

versionintegerRequired

The version you last read. At least 0.

Returns

200 Nothing differs from what is saved, so nothing started. operation is null.

201 The change started. Follow operation.id.

Fields of the 200 answer
domainsobjectRequired

A site's domains with their DNS and certificate state.

Fields
adviceobject or any or nullRequired
applyobjectRequired

Whether a saved set of rules is live on the site.

Fields
applied_atstring or nullRequired
detailany

Sent only by the sets that have more to say, such as HTTP authentication.

errorstring or nullRequired
operationobject or any or nullRequired

The change that is applying the set, while one is running.

statestringRequired

Such as applied or applying.

state_labelstringRequired
canonical_urlstring or nullRequired
cloudflareobject or nullRequired

Whether your company's Cloudflare is connected, and the zone the main domain is in.

Fields
connectedboolean
zoneobject or null
hostsarray of objectsRequired
Fields of each item
cloudflare_zoneobject or nullRequired

The connected Cloudflare zone the hostname is in, with its id and name. proxied and record_id are sent as null.

dns_answersarray of objects or nullRequired
Fields of each item
typestring
valuestring
dns_checked_atstring or nullRequired

Format: date-time.

dns_detailstring or nullRequired
dns_statestringRequired
points_hereproxied_hereelsewhereunresolvedunknown
dns_state_sincestring or nullRequired
expected_ipstring or nullRequired

The address the hostname must point at.

hoststringRequired
noindexboolean

True when search engines are asked not to index this hostname. Not sent in the answer of POST …/domains/point-dns.

redirects_tostring or nullRequired

The hostname this one redirects to. Null when it serves the site itself.

rolestringRequired
primaryaliaspreviewlegacystore
servestring

Sent for extra domains on Shopware, and on Magento 2 while Magento store domains are available.

redirectstorefront
storeobject

A Magento storefront alias's store choice, or the selected choice on the primary. An unmapped alias shows the default store.

Fields
codestring or nullRequired
namestring or nullRequired
previousobject or any or null

While pending, the store losing this host; null for a new storefront. Omitted otherwise.

statestringRequired
mappedpendingunmapped
typestring or nullRequired
websitestorenull
tlsobject or nullRequired

The certificate for the hostname.

Fields
checked_atstring or null

Format: date-time.

issuerstring or null
not_afterstring or null
reasonstring or null
statestring
readypendingfailednone
ingress_ipstring or nullRequired

The address the site's domains must point at.

limitsobjectRequired
Fields
hosts_maxintegerRequired

The most hostnames a site can have, the main domain included.

locked_reasonstring or nullRequired

Why the domains cannot be changed. Null when they can.

modestringRequired

production once a domain is attached, staging before.

productionstaging
noindexbooleanRequired

True when search engines are asked not to index the site.

noindex_sourcestringRequired
roleflagsnone
primarystring or nullRequired

The main domain. Null until a domain is attached.

url_changeobjectRequired
Fields
can_changeobjectRequired

Whether the main domain can be changed now, and why not.

Fields
availableboolean
reasonstring or null
in_flightobject or any or nullRequired

The main domain change that is running, if one is.

versionintegerRequired

Send this with a save. It changes whenever the domains change. At least 0.

wwwstring or nullRequired

Whether the main domain is its www or its bare form.

operationobject or any or nullRequired

The change to follow. Null when nothing differs.

Fields of the 201 answer
domainsobjectRequired

A site's domains with their DNS and certificate state.

Fields
adviceobject or any or nullRequired
applyobjectRequired

Whether a saved set of rules is live on the site.

Fields
applied_atstring or nullRequired
detailany

Sent only by the sets that have more to say, such as HTTP authentication.

errorstring or nullRequired
operationobject or any or nullRequired

The change that is applying the set, while one is running.

statestringRequired

Such as applied or applying.

state_labelstringRequired
canonical_urlstring or nullRequired
cloudflareobject or nullRequired

Whether your company's Cloudflare is connected, and the zone the main domain is in.

Fields
connectedboolean
zoneobject or null
hostsarray of objectsRequired
Fields of each item
cloudflare_zoneobject or nullRequired

The connected Cloudflare zone the hostname is in, with its id and name. proxied and record_id are sent as null.

dns_answersarray of objects or nullRequired
Fields of each item
typestring
valuestring
dns_checked_atstring or nullRequired

Format: date-time.

dns_detailstring or nullRequired
dns_statestringRequired
points_hereproxied_hereelsewhereunresolvedunknown
dns_state_sincestring or nullRequired
expected_ipstring or nullRequired

The address the hostname must point at.

hoststringRequired
noindexboolean

True when search engines are asked not to index this hostname. Not sent in the answer of POST …/domains/point-dns.

redirects_tostring or nullRequired

The hostname this one redirects to. Null when it serves the site itself.

rolestringRequired
primaryaliaspreviewlegacystore
servestring

Sent for extra domains on Shopware, and on Magento 2 while Magento store domains are available.

redirectstorefront
storeobject

A Magento storefront alias's store choice, or the selected choice on the primary. An unmapped alias shows the default store.

Fields
codestring or nullRequired
namestring or nullRequired
previousobject or any or null

While pending, the store losing this host; null for a new storefront. Omitted otherwise.

statestringRequired
mappedpendingunmapped
typestring or nullRequired
websitestorenull
tlsobject or nullRequired

The certificate for the hostname.

Fields
checked_atstring or null

Format: date-time.

issuerstring or null
not_afterstring or null
reasonstring or null
statestring
readypendingfailednone
ingress_ipstring or nullRequired

The address the site's domains must point at.

limitsobjectRequired
Fields
hosts_maxintegerRequired

The most hostnames a site can have, the main domain included.

locked_reasonstring or nullRequired

Why the domains cannot be changed. Null when they can.

modestringRequired

production once a domain is attached, staging before.

productionstaging
noindexbooleanRequired

True when search engines are asked not to index the site.

noindex_sourcestringRequired
roleflagsnone
primarystring or nullRequired

The main domain. Null until a domain is attached.

url_changeobjectRequired
Fields
can_changeobjectRequired

Whether the main domain can be changed now, and why not.

Fields
availableboolean
reasonstring or null
in_flightobject or any or nullRequired

The main domain change that is running, if one is.

versionintegerRequired

Send this with a save. It changes whenever the domains change. At least 0.

wwwstring or nullRequired

Whether the main domain is its www or its bare form.

operationobject or any or nullRequired

The change to follow. Null when nothing differs.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409maintenanceThe site is in maintenance mode, which blocks this. Switch maintenance mode off first.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
409preview_onlyThe environment has no domain attached yet. Attach one first.
409staleWhat you read has changed since you read it. Read it again, then send the change with its new version or quote.
422invalidFix the field named in field; errors says why.
422store_requiredThis address needs a Magento store choice. Choose the Magento website or store view this address shows.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/domains \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "aliases": [
      "www.harbourandfinch.example.com",
      "shop.harbourandfinch.example.com"
    ],
    "noindex": false,
    "version": 4
  }'
{
  "domains": {
    "advice": null,
    "apply": {
      "applied_at": "2026-11-02T14:37:55Z",
      "error": null,
      "operation": null,
      "state": "applied",
      "state_label": "Applied"
    },
    "canonical_url": "https://harbourandfinch.example.com",
    "cloudflare": {
      "connected": false,
      "zone": null
    },
    "hosts": [
      {
        "cloudflare_zone": null,
        "dns_answers": [
          {
            "type": "A",
            "value": "203.0.113.10"
          }
        ],
        "dns_checked_at": "2026-11-06T09:16:05Z",
        "dns_detail": null,
        "dns_state": "points_here",
        "dns_state_since": "2026-11-01T10:14:03Z",
        "expected_ip": "203.0.113.10",
        "host": "harbourandfinch.example.com",
        "noindex": false,
        "redirects_to": null,
        "role": "primary",
        "tls": {
          "checked_at": "2026-11-06T09:14:41Z",
          "issuer": "Let's Encrypt",
          "not_after": "2026-12-08T05:41:17Z",
          "reason": null,
          "state": "ready"
        }
      },
      {
        "cloudflare_zone": null,
        "dns_answers": [
          {
            "type": "A",
            "value": "203.0.113.10"
          }
        ],
        "dns_checked_at": "2026-11-06T09:16:05Z",
        "dns_detail": null,
        "dns_state": "points_here",
        "dns_state_since": "2026-11-01T10:14:03Z",
        "expected_ip": "203.0.113.10",
        "host": "www.harbourandfinch.example.com",
        "noindex": false,
        "redirects_to": "harbourandfinch.example.com",
        "role": "alias",
        "tls": {
          "checked_at": "2026-11-06T09:14:41Z",
          "issuer": "Let's Encrypt",
          "not_after": "2026-12-08T05:41:17Z",
          "reason": null,
          "state": "ready"
        }
      }
    ],
    "ingress_ip": "203.0.113.10",
    "limits": {
      "hosts_max": 10
    },
    "locked_reason": null,
    "mode": "production",
    "noindex": false,
    "noindex_source": "flags",
    "primary": "harbourandfinch.example.com",
    "url_change": {
      "can_change": {
        "available": true,
        "reason": null
      },
      "in_flight": null
    },
    "version": 4,
    "www": "bare"
  },
  "operation": null
}
Try it

Try it is off for this endpointIt deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT