> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/build/custom-domain.md).

# Bind your own domain to a Duaer digital organization

On Duaer Starter and higher, bind a subdomain you own, such as chat.example.com, to a published digital organization. Opening the domain shows its form or chat page. It takes three steps: enter the domain in Duaer, add two records at your DNS provider, and check in Duaer.
## Before you bind

- The digital organization is published, and the published version has a form trigger or a chat trigger with Make Chat Publicly Available on.
- You own a domain whose DNS you can edit. Only subdomains such as chat.example.com work; a root domain such as example.com does not.
- The subdomain is not used for anything else. If it already has an A, AAAA, or CNAME record, delete it first, or the new record is rejected or ignored.
- Your plan is Duaer Starter or higher. Refer to the quota below.

## Step 1: Enter the domain in Duaer <a href="#step-1" id="step-1"></a>

1. Open the digital organization, then select Settings in the ... menu at the top right.
2. At the bottom of the settings, find Custom domain and enter the subdomain, such as chat.example.com.
3. If the digital organization has both a form and a public chat, choose what the root opens: Opens the form page or Opens the chat page.
4. Select Bind. The status shows Pending DNS and a records table appears.

The table has three columns, Type, Host, and Value, with a copy button in each cell. For chat.example.com it looks like this:

```
CNAME   chat                  custom.duaer.com
TXT     _duaer-verify.chat    duaer-verify=<token shown in Duaer>
```

## Step 2: Add Duaer's two records at your DNS provider

Sign in where your domain's DNS is managed and add both records to example.com. Host is the part in front of example.com, so enter only chat and _duaer-verify.chat. Do not enter the full name, or it becomes chat.example.com.example.com.

Not sure which provider? Look up the NS records of your domain: dns*.hichina.com is Alibaba Cloud, *.dnspod.net is Tencent Cloud DNSPod, and *.ns.cloudflare.com is Cloudflare.

## Add Duaer's records on Alibaba Cloud DNS <a href="#aliyun" id="aliyun"></a>

1. In the Alibaba Cloud console, open Alibaba Cloud DNS › Authoritative DNS Resolution and select DNS Settings next to example.com.
2. Select Add Record: Record Type CNAME, Hostname chat, Request Source Default, Record Value custom.duaer.com, keep the default TTL of 10 minutes, and select OK.
3. Select Add Record again: Record Type TXT, Hostname _duaer-verify.chat, Record Value the whole string starting with duaer-verify= from Duaer, and select OK.

If the console reports a conflict, delete the existing A or CNAME record for chat first.

## Add Duaer's records on Tencent Cloud DNSPod <a href="#dnspod" id="dnspod"></a>

1. In the DNSPod console, open My Domains, select example.com, and go to Record Management.
2. Select Add Record: Host chat, Record Type CNAME, Split Zone Default, Record Value custom.duaer.com, and confirm.
3. Add another: Host _duaer-verify.chat, Record Type TXT, Record Value the whole string starting with duaer-verify=, and confirm.

## Add Duaer's records on Cloudflare <a href="#cloudflare" id="cloudflare"></a>

1. In Cloudflare, select example.com, open DNS › Records, and select Add record.
2. Type CNAME, Name chat, Target custom.duaer.com. Turn Proxy status off so it shows the grey cloud, DNS only. Select Save.
3. Add another: Type TXT, Name _duaer-verify.chat, Content the whole string starting with duaer-verify=. Select Save.

Keep the proxy off. With the orange cloud (Proxied), the name resolves to Cloudflare addresses, so Duaer cannot see the CNAME or issue a certificate.

## Add Duaer's records at other providers

Huawei Cloud, GoDaddy, Namecheap, and others work the same way: create one CNAME and one TXT record. The field may be called Host, Name, or Hostname; enter chat and _duaer-verify.chat. A few providers want the full name; then enter chat.example.com and _duaer-verify.chat.example.com.

## Step 3: Check DNS in Duaer <a href="#step-3" id="step-3"></a>

1. Back under Custom domain, select Check DNS.
2. If something is missing, Duaer says whether it is the CNAME or the TXT record. New records usually appear within minutes; a changed record waits for its old TTL.
3. Once both are found, the status turns Active and the domain becomes a link. On the first visit Duaer issues the HTTPS certificate, which can take a few seconds.

To check the records yourself, run this in a terminal:

```
nslookup -type=CNAME chat.example.com
nslookup -type=TXT _duaer-verify.chat.example.com
```

## What a Duaer custom domain serves

- Only the root: https://chat.example.com/ opens the form or chat page, and a form submit runs the published version of the digital organization.
- Every other path shows "This page is not available right now". The Duaer editor and webhooks are not exposed.
- The chat page still sends messages to api.duaer.com. The chat trigger's Allowed Origins (CORS) defaults to *; if you changed it, add https://chat.example.com.

## Duaer custom domain status

- Pending DNS: the records are not visible yet.
- Active: the domain opens the digital organization.
- Paused: over your plan's domain limit. It comes back when you upgrade.
- Unavailable: the digital organization was unpublished, or the published version lacks the chosen form or chat. Publish again to restore it.

## Troubleshoot a Duaer custom domain <a href="#troubleshooting" id="troubleshooting"></a>

- The CNAME is never found: check that Host is just chat, that the Cloudflare proxy is off, and that no old A record remains for chat.
- The TXT record is never found: Host must be _duaer-verify.chat, not _duaer-verify, and the value must include the duaer-verify= prefix with no extra characters.
- Active, but the browser shows a certificate error: wait a few seconds and reload. The certificate is issued on the first visit.
- The chat page opens but messages fail: the chat trigger's Allowed Origins (CORS) does not include your domain.
- You see "This page is not available right now": open the root address and make sure the status is Active.

## Duaer plan domain quota

- Hobby cannot bind; Starter gets 1; Pro gets 3; Business is unlimited. A digital organization has at most one domain, and a domain belongs to one digital organization.
- The quota counts per paying account. After a downgrade, the newest domains over the limit pause; nothing is deleted. Refer to [Duaer plans and credits](/manage-cloud/plans.md).

## Unbind a Duaer custom domain

Select Unbind under Custom domain. The domain stops opening the digital organization right away and can be bound elsewhere. Deleting the digital organization also unbinds its domain. Then remove the two records at your DNS provider.
## Questions

### Can a Duaer custom domain be a root domain?

No. Duaer custom domains accept subdomains such as chat.example.com, because a root domain usually cannot hold a CNAME.

### Why does Duaer need a TXT record as well as the CNAME?

Anyone can point a CNAME at Duaer. The token in the TXT record proves you own the domain, and Duaer issues certificates only for domains with both records.

### How long until a Duaer custom domain works?

New DNS records usually appear within minutes. Once Check DNS in Duaer shows Active the domain opens; the certificate on the first visit takes a few seconds.

## Related

- [Collect a form submission in Duaer](https://doc.duaer.com/build/form-trigger.md)
- [Configure digital-organization settings in Duaer](https://doc.duaer.com/build/manage-workflows/configure-workflow-settings.md)
- [Duaer plans and credits](https://doc.duaer.com/manage-cloud/plans.md)

