Custom domains
Point your domain at ButterIX with a CNAME and prove you own it with a TXT record. Once verified, the platform issues an HTTPS certificate automatically and the domain serves the site's production deployment.
Every site already has a default URL, https://<subdomain>-sites.butterix.com. Once you connect a custom domain (such as docs.acme.com), both addresses work and point to the same production deployment.
Setup
Add the domain
In the organization console (https://console.butterix.com), open the site's "Domains" tab, click "Add domain", and enter the full domain, e.g. docs.acme.com (requires the admin role). Pasting a URL with https:// or a path also works — the platform strips the extra parts.
A domain can be connected to only one site, and the total number of domains an organization can connect is limited by its quota.
Add the CNAME record
At your DNS provider, add a CNAME record pointing the domain at ButterIX:
| Type | Name | Value |
|---|---|---|
| CNAME | docs (i.e. docs.acme.com) | sites.butterix.com |
Add the TXT record
Then add a TXT record to prove you own the domain. Use the token shown in the console:
| Type | Name | Value |
|---|---|---|
| TXT | _butterix.docs.acme.com | butterix-verify=a1b2c3d4e5f6… |
Some DNS providers only want the part before your root domain in the "Name" field; in that case, enter _butterix.docs.
Verify
Back in the console, click "Verify". The platform looks up the TXT record at _butterix.<your domain>; when it matches, the domain is marked "Verified" and starts serving the site immediately.
DNS changes can take anywhere from a few minutes to a few hours to propagate; if verification fails, just try again later.
Via the API
curl -X POST https://api.butterix.com/v1/sites/acme-payments/domains \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"domain": "docs.acme.com"
}'{
"domain": "docs.acme.com",
"verified": false,
"primary": false,
"verifyRecord": {
"type": "TXT",
"name": "_butterix.docs.acme.com",
"value": "butterix-verify=a1b2c3d4e5f6"
},
"cname": "sites.butterix.com",
"createdAt": 1
}{
"error": "Use 5–40 lowercase letters, numbers and single hyphens."
}{
"error": "That subdomain is taken."
}In the response, verifyRecord is the TXT record to add and cname is the CNAME target. Once the records are in place, call Verify domain.
After activation
- The custom domain and the default
<subdomain>-sites.butterix.comaddress both work and point to the same production deployment. - A site can have several custom domains; each one is verified separately.
- Primary domain: canonical URLs, the sitemap,
robots.txt,llms.txt, feeds, and.mdpages use the primary domain for absolute URLs. By default it is the most recently verified custom domain, once its HTTPS certificate is active. To use another one, click "Make primary" in the "Domains" tab (or call Set primary domain); domains you add later then no longer take over. Without a custom domain, the default URL is used. - When the primary domain changes, the platform redeploys the version that is live, and absolute URLs update when it finishes. Deployments uploaded directly to a Git-connected site from your own CI have no source to rebuild from and update with the next deployment.
- If the site has password protection, the custom domain requires the password too.
- Once you remove a domain, it stops serving the site immediately; you can then delete the CNAME and TXT records from your DNS.
Deploy under a subpath
To serve the docs under a subpath of your main site (e.g. acme.com/docs):
- Set
basepath: /docsindocs.yml(or writeacme.com/docsininstances[0].custom-domain, and it's inferred automatically). Every page, asset, andllms.txtgets this prefix. - On your main site's reverse proxy, forward
/docs/*to the docs site's default URL.
location /docs/ {
proxy_pass https://acme-payments-sites.butterix.com;
proxy_set_header Host acme-payments-sites.butterix.com;
proxy_ssl_server_name on;
}FAQ
What if I can't set a CNAME on the apex domain (acme.com)?
Most DNS specs don't allow a CNAME on the apex domain. Use a subdomain (such as docs.acme.com), or use your DNS provider's ALIAS / ANAME / CNAME flattening feature to point the apex at sites.butterix.com.
Verification keeps failing
Run dig TXT _butterix.docs.acme.com +short to check that the TXT record has propagated and that the value matches the console exactly (including the butterix-verify= prefix). Also make sure your DNS provider didn't append the root domain again, turning the name into _butterix.docs.acme.com.acme.com.
What do visitors see before the domain is verified?
Once the CNAME is live but before verification, opening the domain over http:// shows a page explaining whether it still needs to be added to a site or only needs the TXT check. The certificate is issued after verification, so until then https:// reports that a secure connection can't be established.
How long until HTTPS works? Do I need to upload a certificate?
No upload needed. Once the domain is verified, the platform issues a certificate through Let's Encrypt, usually within a minute or two, and renews it automatically 30 days before it expires. If the browser still reports an invalid certificate after a few minutes, check that the CNAME points at sites.butterix.com and that no CAA record on the domain blocks Let's Encrypt.
Can I put my own CDN or proxy in front of the domain?
Certificate issuance requires Let's Encrypt to reach ButterIX directly, so keep the domain's CNAME record in "DNS only" mode. If traffic must go through your own CDN, configure a certificate for the domain on the CDN and set the origin to sites.butterix.com.
Error: “This domain is already connected”
The domain is already connected to a site (possibly one in another organization). Remove it from that site first.