CorefinityCorefinityDocs
Open the Control PanelControl Panel
Playbooks · 10 of 13

Put a new site live on its domain

Attach a domain to a new site, point its DNS, follow the certificate until it is live, tidy up production settings and verify on the live host.

go-live
On this page

Start it

Paste this into an assistant that is connected to Corefinity.

Prompt
Use the Corefinity MCP prompt "go-live" with site: <the site: its domain, or the id of any of its environments>, domain: <the domain to put live, for example shop.example.com>, www: <which form is canonical: apex (example.com) or www (www.example.com)>. Follow it step by step and tell me before anything that changes my account.

Arguments

siteRequired

The site: its domain, or the id of any of its environments.

domainRequired

The domain to put live, for example shop.example.com.

www

Which form is canonical: apex (example.com) or www (www.example.com).

What your assistant is told

Purpose: put <the site's domain> live on the domain <domain>.

  • The canonical form: <www> (apex or www; when not given, ask the person).

A site you migrated from another host uses the cutover-and-rollback prompt instead.

Before you start

  • The row you work on is site row <the id of the site row you work on> (<the environment's name>). Use it as site_id.
  • Ask before every change, and type a confirm_* value only after the person has said yes to that exact action.
  • If a call is refused because this token lacks a scope or the site is outside its limits, the person is asked to allow it in the Control Panel; carry on once they have.

Steps

  1. Check. Run corestack_site_attach_domain_check and corestack_domains_check_dns for the domain and its www twin. If the check's blockers lists platform_plugins_off, the site's platform plugins are turned off and it cannot go live: tell the person its message, and with their agreement turn them back on with corestack_site_platform_plugins_set {enabled: true}. Follow the task it answers until it completes before you attach. If blockers lists platform_plugins_applying, they are back on but not applied yet: check again in a minute, and if it stays, turn them on again the same way and follow the new task. If the check lists a host in proxied_unconfirmed, Cloudflare proxies it and the Control Panel cannot see the address behind it. When its certificate path blocks it (challenge_path.ok false), tell the person its challenge_path.note, the change to make in Cloudflare, and check again once they have made it. When its verification.found is false, ask the person to add the TXT record verification.name with the value verification.value in Cloudflare (it shows the host is theirs), then check again. Once a host is confirmable, ask the person to check in Cloudflare that its record points at its expected_ip, and give corestack_site_attach_domain proxied_records_checked: true only once they say it does.
  2. Attach. Use corestack_site_attach_domain, or corestack_domains_update when the domain is already attached, with the canonical form the person chose. A Magento install with several stores stays on one Control Panel site. Read corestack_site_magento_stores_list; attach each store's domain with aliases entries {host, serve: "storefront", store: {code, type}}. Map its www form to the same store. Add a store domain later with corestack_domains_update; change which store an existing address shows with corestack_site_magento_store_mapping_update. If store codes in URLs were a workaround, switch Add Store Code to URLs off in Magento. Each website's base URL belongs on its own domain, or is left for the attach to set from the site's own addresses. A foreign base URL is left alone unless the person chooses otherwise.
  3. DNS. If corestack_company_cloudflare_get shows the domain's zone, point it with corestack_domains_point_dns. Otherwise give the person the exact records to add.
  4. Follow until the certificate is live, with corestack_site_operation_get and corestack_domains_get.
  5. Production settings the person confirms: HTTP authentication off with corestack_http_auth_update, and search engines allowed with corestack_domains_update.
  6. Verify on the live host with corestack_site_http_check or the smoke test, corestack_site_smoke_test. For each Magento store domain: Request / with corestack_site_smoke_test, setting host to the store domain. The final URL must be on that store's base_url host from corestack_site_magento_stores_list (the domain itself, or its bare or www form when the base URL uses it), and the title must be that store's. Magento redirects to the store's base URL; a redirect to any other host means its base URL points elsewhere. GraphQL picks its store from the Store header, so it cannot prove a domain's store.

Stop and ask

  • Before attaching the domain, before changing DNS, and before turning HTTP authentication off.
  • If the domain is already live on another server: this is a migration; use cutover-and-rollback.

When you are done

Report the live address, the certificate's state, and anything the person still has to do at their DNS provider.

Was this helpful?
Open in ClaudeOpen in ChatGPT