Checkout Domains
Checkout is always hosted by BigCommerce, never by your Catalyst application. When a shopper starts checkout, your storefront asks BigCommerce for a single-use redirect URL and sends them to it — so the domain checkout runs on is a property of the channel, not of your code. This page covers putting checkout on the same domain as your storefront with the Catalyst CLI, whether the storefront is on an auto-generated hostname or on your own domain.
The Catalyst CLI is generally available, but Storefront Hosting is currently in closed beta. There may be breaking changes to the Storefront Hosting APIs as we finalize them. To express interest in gaining access, fill out the Storefront Hosting Closed Beta Interest Form.
Why the checkout domain matters
Because your storefront and checkout are served by different systems, they can end up on different domains. When they do, browsers that restrict cross-domain cookies — Safari with Intelligent Tracking Prevention, and Chrome’s privacy controls — may not carry the shopper’s session and cart from one to the other.
BigCommerce enforces a rule that prevents this: the checkout URL must share a main domain with the channel’s storefront URL. A storefront on www.example.com can use checkout.example.com, but not checkout.example.org. Setting a checkout URL that breaks the rule returns an error explaining it.
A channel that has no checkout URL of its own falls back to a shared checkout domain — the primary URL of the store’s default channel, which is usually a mybigcommerce.com hostname. That fallback works, but it is almost always a different domain than your storefront. It is also easy to miss: changing a channel’s site URL doesn’t move its checkout URL to the new domain. BigCommerce removes a channel’s custom checkout URL whenever its site URL changes, so checkout falls back to the shared domain until you set a checkout URL again. After any site URL change, re-check checkout with channels info.
Prerequisites
- The channel’s site URL pointing at your storefront, either its auto-generated hostname or a custom domain. See
channels update. BigCommerce checks the same-domain rule against this URL, so set it before the checkout URL. - Store credentials available to the CLI, either from
pnpm catalyst auth loginor through--store-hashand--access-token. See Authentication.
Check the current configuration
Run channels info to see where a channel’s storefront and checkout currently point:
The three URLs are distinct and easy to confuse:
Here, the storefront is on a custom domain, but the channel has no checkout URL of its own. The command says so and warns that checkout is on a different domain than the storefront:
A channel doesn’t start this way when you create it with One-Click Catalyst. It starts with its preview URL as the storefront and its own checkout URL on the same preview domain:
You see the warning above when a channel was created without a checkout URL, for example through the API, or when a storefront URL change removed it. Either way, give the channel a checkout URL of its own on the storefront’s domain before production.
A channel that does have its own checkout URL, but on a domain that no longer matches the storefront, gets a different warning — that usually means a storefront URL change left the checkout URL behind:
Auto-generated hostnames
A project that has not been given a custom domain is served from an auto-generated hostname in the form <your-project>.catalyst-sandbox.store. Its checkout hostname is the same hostname with a c. prefix:
There is nothing to set up beforehand. Setting c.<your-project>.catalyst-sandbox.store as the channel’s checkout URL is what provisions it: BigCommerce creates its DNS record and issues its certificate in response. The certificate usually takes a minute or two, and checkout fails on that hostname until it has one.
The easiest way to set it is to accept the prompt after a deploy (see Set it during a deploy). The CLI sets the checkout URL, waits for the certificate, and confirms when checkout is being served:
If no certificate is issued within six minutes, the CLI removes the checkout URL again, so checkout falls back to the shared domain rather than staying broken. Run the deploy again with --update-checkout-url to retry.
You can also set it directly. The command returns as soon as the URL is saved, so allow a minute or two for the certificate before sending shoppers to checkout:
When channels update points a channel at an auto-generated hostname in an interactive terminal, it offers to move checkout onto that hostname’s c. name too.
The checkout hostname belongs to the channel, not to the project. Deleting the project leaves it in place, and it’s released when you remove the channel’s checkout URL, change the channel’s site URL, or delete the channel. Until it’s released, no other channel can use the name.
Custom domains
A storefront on your own domain needs a checkout subdomain on that domain, which you point at BigCommerce yourself. In addition to the prerequisites, you need:
- The custom domain attached to your project and serving your storefront. See Custom Domains.
- Access to the DNS zone for the domain.
Point the domain at BigCommerce
Publish a CNAME record for the checkout subdomain pointing at the channel’s canonical hostname — the store-<hash>-<channel-id>.mybigcommerce.com value that channels info prints:
The canonical hostname is per-channel, so use the one belonging to the channel you are configuring rather than another channel’s.
Do not add the checkout subdomain with catalyst domains add. That
command routes a domain to your Storefront Hosting project, and your project does
not serve checkout — BigCommerce does. The checkout domain is configured on
the channel instead, with the command in the next step.
Provision a certificate for it
BigCommerce terminates TLS for checkout, so the certificate for the checkout domain is installed on the BigCommerce side, not in your Storefront Hosting project. Configure it in the store control panel’s domain settings, or upload your own with the Upsert a site’s SSL/TLS certificate information endpoint.
Do this before setting the URL, so shoppers never reach a checkout domain without a valid certificate.
Set it during a deploy
After a successful interactive deploy, catalyst deploy checks the channel the storefront was built for (its BIGCOMMERCE_CHANNEL_ID) and offers two updates, each asked separately:
- If the channel’s site URL isn’t one of the project’s hostnames, it offers to point it at the deployment.
- If the storefront is on an auto-generated hostname and checkout is on another domain, it offers to move checkout to the storefront’s
c.hostname.
Both prompts default to No, so pressing Enter never changes a live channel. Declining either one is saved for that channel in .bigcommerce/project.json, and that offer isn’t made again. A channel whose checkout URL you’ve already customized is left alone. No prompts appear when the terminal isn’t interactive or the CI environment variable is set, so scripted deploys are unaffected.
To choose the channel and URLs yourself instead, pass the flags. They skip the offers above:
On an auto-generated hostname, --update-checkout-url sets the c. hostname directly. On a custom domain, it prompts for the checkout URL, defaulting to the checkout. subdomain of the storefront’s domain. Passing both flags asks which channel only once. None of this can fail the deploy: by the time it runs, your bundle is already live.
Revert to the shared checkout domain
This removes the channel’s own checkout URL, and checkout falls back to the shared domain. Traffic keeps working, so shoppers are not interrupted, but the cross-domain caveats above apply again. On an auto-generated hostname, this also releases the c. hostname.
Troubleshooting
For the full set of flags, see the CLI Reference.