Records to add
LeafCloud shows the DNS records for each domain when you add it. Copy the names and values exactly. You can see them again at any time:
leaf domains show shop.example.comIn the dashboard, open the domain. In the API, read records from GET /v1/domains/{domain}.
Do not use the examples below as values. Each domain has its own verification token and its own targets. The target names end in leafcloud.app for the site, and the challenge target ends in acme.leafcloud.in.
Create every record at the DNS provider that hosts the domain’s DNS. That is the provider whose name servers the domain uses. DNS providers lists the details for common providers.
A domain for one project
Section titled “A domain for one project”For shop.example.com:
| Type | Name | Value | Why |
|---|---|---|---|
| TXT | _leafcloud-verify.shop.example.com | the verification token | Proves that you control the domain. |
| CNAME | shop.example.com | the site target, which ends in leafcloud.app | Sends visitors to the project. |
| CNAME | _acme-challenge.shop.example.com | the challenge target, which ends in acme.leafcloud.in | Lets LeafCloud issue and renew the certificate, using DNS. No web server needs to answer. |
For the bare domain (example.com), the CNAME’s name is the domain itself. Most providers write this as @. Many DNS providers do not allow a CNAME at the bare domain. Use the flattening option described in DNS providers. The record’s value stays the same.
For a www pair, LeafCloud adds both hosts, example.com and www.example.com:
- The TXT record is shared. It is one
_leafcloud-verify.example.comrecord, and it covers both hosts. - Each host has its own CNAME to the site target.
- Each host has its own
_acme-challengeCNAME. The bare domain needs_acme-challenge.example.comandwwwneeds_acme-challenge.www.example.com.
Keep the _acme-challenge records. LeafCloud uses them every time it renews the certificate. See Status and checks.
A project-addresses domain
Section titled “A project-addresses domain”For example.app, which gives projects addresses under it:
| Type | Name | Value | Why |
|---|---|---|---|
| TXT | _leafcloud-verify.example.app | the verification token | Proves that you control the domain. |
| CNAME | *.example.app | the site target, which ends in leafcloud.app | Sends every project address on the domain to LeafCloud. |
| CNAME | _acme-challenge.example.app | the challenge target, which ends in acme.leafcloud.in | Lets LeafCloud issue and renew the wildcard certificate, using DNS. |
The * record is a wildcard. It covers every name that has no record of its own, so one record serves every project. An explicit record for a name always wins over the wildcard. See Troubleshooting.
If you also serve the bare domain or www under the project-addresses domain, add those records too:
| Address | Type | Name | Value |
|---|---|---|---|
| Bare domain | CNAME | @ (the domain itself) | the site target, shown in leaf domains show |
www | CNAME | www | the site target, shown in leaf domains show |
The bare domain needs a flattening record, as above. Only add the www record when the www address is on. Otherwise the wildcard does not answer for www.
Things to avoid
Section titled “Things to avoid”- Do not proxy the records. On Cloudflare, every record must be DNS only (grey cloud), not Proxied (orange cloud). A proxied record stops LeafCloud from getting the certificate, and visitors can see Cloudflare error 525. See Troubleshooting.
- Do not copy an IP address from elsewhere. LeafCloud does not publish IP addresses. Use the hostname that
leaf domains showprints. For the bare domain, a flattened or ALIAS record looks up that hostname for you. - Do not add a second TXT record for the same name. The token must match exactly. Replace an old value instead of adding a new one.
- Do not delete the
_acme-challengerecord after the domain is live. Renewals need it.