---
title: "Go live with a domain"
url: https://docs.corefinity.com/api/recipes/go-live-with-a-domain
type: page
last_updated: 2026-11-13
feature: recipe-go-live-with-a-domain
---
# Go live with a domain

Check a domain, attach it to a site and confirm the site answers on it.

Attaching a domain takes a site live on it. This recipe takes the production site `harbourandfinch.example.com` live on its `www` form.

## Before you start

- A token with the `read` and `write` [scopes](/api/scopes), and a person who can change the site.
- Every step needs [two-factor enrolment](/api/two-factor) when your company requires it.
- No step waits for a maintenance window.

1. **Find the site id**

   List your sites and note the `id` of the site or environment to take live.

   ```bash
   curl "https://manage.corefinity.com/api/corestack/sites?search=harbourandfinch" \
     -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"
   ```

2. **Check the domain**

   Send every hostname the site should answer on, and the one to use as its main address. On a production site the hostnames include the site's domain or its `www` form.

   Nothing changes.

   ```bash
   curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/attach-domain/check \
     -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d '{"hosts": ["harbourandfinch.example.com", "www.harbourandfinch.example.com"], "canonical": "www.harbourandfinch.example.com", "www": "www"}'
   ```

   The answer is `200` with the check:

   | Field      | Meaning                                                                              |
   | ---------- | ------------------------------------------------------------------------------------ |
   | `ok`       | `true` when every hostname is ready                                                  |
   | `hosts`    | Each hostname with what is missing                                                   |
   | `blockers` | What would refuse the attach whatever DNS says, each with its `reason` and `message` |

3. **Fix what the check reports**

   Point each hostname's DNS as the check describes, then run the check again until `ok` is `true` and `blockers` is empty.

4. **Attach the domain**

   Send the same fields with `confirm_domain`. On a production site it is the site's current domain; on any other environment it is the main address you are attaching.

   > **Warning:** Attaching replaces the address the application stores: the site's own address becomes the main hostname, and addresses stored in the site are rewritten to it. On a production site it also switches off the HTTP login that covers the whole environment, so visitors can reach the site.

   ```bash
   curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/attach-domain \
     -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d '{"hosts": ["harbourandfinch.example.com", "www.harbourandfinch.example.com"], "canonical": "www.harbourandfinch.example.com", "www": "www", "confirm_domain": "harbourandfinch.example.com"}'
   ```

   The answer is `201` with an operation to follow. Note its `id`.

5. **Follow the operation**

   Read the operation every few seconds until its `status` is `completed` or `failed`; see [Long-running work](/api/long-running-work).

   ```bash
   curl https://manage.corefinity.com/api/corestack/operations/5120 \
     -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"
   ```

6. **Confirm the domains**

   Read the site's domains to see the new main address.

   ```bash
   curl https://manage.corefinity.com/api/corestack/sites/1042/domains \
     -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"
   ```

## If it is refused

| Status | `reason`               | What to do                                                                                                                                                                     |
| ------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `422`  | `confirm_mismatch`     | Send `confirm_domain` exactly as step 4 describes                                                                                                                              |
| `422`  | `invalid`              | Correct the field in `errors`, often `hosts` or `canonical`. On `hosts` it can also mean DNS does not point at the platform yet: go back to step 3                             |
| `409`  | `already_attached`     | The environment already has a domain. Change its main domain with `POST /corestack/sites/{site}/url-change`, or its other hostnames with `PUT /corestack/sites/{site}/domains` |
| `409`  | `busy`                 | Wait for the site's running change to finish                                                                                                                                   |
| `409`  | `platform_plugins_off` | Turn the site's platform plugins on first, and attach once that change has applied                                                                                             |
| `404`  | `feature_off`          | Attaching a domain is not on for your company                                                                                                                                  |

Checks share a budget of 20 a minute and attaching allows 5 a minute; see [Rate limits](/api/rate-limits).
