CorefinityCorefinityDocs
Open the Control PanelControl Panel
Recipes · 2 of 8

Go live with a domain

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

On this page

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, and a person who can change the site.
  • Every step needs two-factor enrolment 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.

    Terminal
    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.

    Terminal
    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:

    FieldMeaning
    oktrue when every hostname is ready
    hostsEach hostname with what is missing
    blockersWhat 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.

    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.

    Terminal
    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.

    Terminal
    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.

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

If it is refused

StatusreasonWhat to do
422confirm_mismatchSend confirm_domain exactly as step 4 describes
422invalidCorrect 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
409already_attachedThe 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
409busyWait for the site's running change to finish
409platform_plugins_offTurn the site's platform plugins on first, and attach once that change has applied
404feature_offAttaching 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.

Was this helpful?
Open in ClaudeOpen in ChatGPT