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
readandwritescopes, 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.
Find the site id
List your sites and note the
idof the site or environment to take live.curl "https://manage.corefinity.com/api/corestack/sites?search=harbourandfinch" \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"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
wwwform.Nothing changes.
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
200with the check:Field Meaning oktruewhen every hostname is readyhostsEach hostname with what is missing blockersWhat would refuse the attach whatever DNS says, each with its reasonandmessageFix what the check reports
Point each hostname's DNS as the check describes, then run the check again until
okistrueandblockersis empty.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.
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
201with an operation to follow. Note itsid.Follow the operation
Read the operation every few seconds until its
statusiscompletedorfailed; see Long-running work.curl https://manage.corefinity.com/api/corestack/operations/5120 \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"Confirm the domains
Read the site's domains to see the new main address.
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 /, 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.