Custom Domains in Depth

How the Domains tab checks your DNS, why a record is refused, and how to fix it.

Updated Dec 1, 2026

A custom domain lets visitors reach your deployment at an address you own, such as bot.yourdomain.com or yourdomain.com, with an HTTPS certificate handled for you. This page explains what happens behind each button of the Domains tab. For the short version, see Link a Domain.

Before you start

  • Activate domains first. In the Domains tab, click Activate domains. A custom domain can only be attached to a deployment that has its canonical URL.
  • One custom domain per deployment. Each deployment has one custom domain and one pretty alias at most. To serve another domain, use another deployment or a redirect at your DNS provider (see www and the root domain).
  • Your app must already work on its canonical URL. The custom domain points to the same app on the same port. If the canonical URL shows "Your app isn't answering.", fix that first with The edge and reverse proxy.

Subdomain or root domain

Type the domain in the Domain field and click Attach. The panel then shows the exact record to add. Which record depends on what you entered.

You entered Example Records the panel asks for
A subdomain bot.yourdomain.com, www.yourdomain.com One CNAME record named after your domain, whose value is the ingress host shown in the panel
A root domain (two parts) yourdomain.com One A record on @ pointing to the edge IP shown in the panel, plus one TXT record at _bothosting-verify.yourdomain.com holding your verify token

Copy the values with the copy buttons next to them. Do not type them from memory, and do not reuse values from another deployment, since each domain gets its own token.

Why a root domain needs two records

Most DNS hosts refuse a CNAME on the root of a domain. A root domain therefore points to the edge with an A record, and the TXT record proves to us that you control the domain.

Domains with a two-part suffix

The panel counts the parts of the name to decide. A domain such as yourdomain.co.uk has three parts, so the panel treats it like a subdomain and shows a CNAME. Most DNS hosts refuse that on a root domain. Attach a real subdomain instead, such as www.yourdomain.co.uk or app.yourdomain.co.uk.

What is not accepted

  • Wildcards such as *.yourdomain.com. Attach each hostname you need to its own deployment.
  • Addresses under apps.bot-hosting.cloud. The panel answers "This domain is managed by us. Use the alias field instead." Use the Pretty alias field for those.
  • Names with characters other than lowercase letters, digits, hyphens and dots. Enter internationalized domains in their xn-- form.

Verify the domain

  1. Add the record (or the two records) at your DNS host, exactly as shown.
  2. Wait a few minutes. The panel shows "DNS can take a few minutes to propagate."
  3. Click Re-check DNS to refresh the live checks under What we see right now.
  4. When the checks turn green, click Verify now.

The panel accepts either proof of ownership.

  • A CNAME that points to the ingress host. This is both the proof and the route for a subdomain.
  • The TXT record at _bothosting-verify.<your domain> holding your token. This is the proof for a root domain.

Verification queries public DNS resolvers, so it sees what the rest of the internet sees, not what your own computer has cached. You can click Verify now once every 15 seconds.

The live checks

Under What we see right now, the panel shows what public DNS returns at this moment.

Check Shown for Green when
CNAME to ingress Subdomains The domain's CNAME points to the ingress host
A record to edge Root domains One of the domain's A records is the edge IP
TXT ownership proof Root domains The TXT record holds your token

"not detected yet" means public DNS does not return the expected value yet. The line below the checks says whether HTTPS already answers.

After verification

  • The domain shows Live and "Verified and served over HTTPS. The certificate renews automatically."
  • The certificate is issued the first time someone opens the domain over HTTPS. Until then the status reads Propagating…, then Certificate live.
  • The edge starts routing the domain within a few seconds. Requests reach the same app as the canonical URL, on the primary port.
  • Your app receives the custom domain in the Host header, so it can tell its addresses apart if it needs to.

Keep the DNS record in place. The certificate renews automatically, and renewal needs the domain to keep pointing to the edge.

Cloudflare

If your domain's DNS is on Cloudflare, set the record to DNS only (grey cloud), not Proxied (orange cloud).

The edge terminates HTTPS itself and needs visitors to reach it directly. With the orange cloud on, Cloudflare hides the CNAME behind its own addresses, so the panel cannot see it, and the edge cannot obtain your certificate. When the panel detects a proxied record, it shows a red warning that says the record is proxied by Cloudflare and asks you to switch it to DNS only.

Proxying through Cloudflare is not supported. If you still turn the orange cloud on after verification, know what changes.

  • Set Cloudflare's SSL/TLS mode to Full. With Flexible, Cloudflare connects over plain HTTP, the edge redirects to HTTPS, and visitors end up in a redirect loop.
  • Your app sees Cloudflare addresses in X-Forwarded-For. The visitor's IP is in CF-Connecting-IP.
  • Certificate renewal can fail behind the proxy. If it does, switch back to DNS only.

www and the root domain

A deployment has one custom domain, so yourdomain.com and www.yourdomain.com cannot both be attached to it. Attach the one you want visitors to use, then set up a redirect for the other at your DNS host or registrar (most offer a "URL redirect" or "forwarding" record). The redirect itself is served by your provider, not by Bot-Hosting.

DNS propagation and conflicting records

  • Lower the TTL of the record a few hours before you change it. Resolvers keep an old answer until its TTL expires.
  • Remove conflicting records. A name that has a CNAME cannot have any other record. At the root, remove any old A record that points to your previous host, otherwise some visitors still reach it.
  • Remove old AAAA records on the same name. An AAAA record that points to your previous host sends visitors who use IPv6 there, and can block the certificate. Add only the records the panel shows.
  • Check CAA records. If your domain has CAA records, they must allow letsencrypt.org, otherwise the certificate cannot be issued.
  • Moving a deployment does not affect your domain. The record points to the edge, not to a node, so it keeps working when the deployment changes node.

Ownership rules

  • Attaching a domain does not reserve it. Several deployments can have the same domain attached and pending.
  • The first deployment that proves ownership gets the domain. The pending attachments on other deployments are cleared at that moment.
  • Once a domain is verified, no other deployment can attach it until it is removed.
  • Re-attaching the same domain keeps the same verify token, so a TXT record you already added stays valid. Attaching a different domain creates a new token.
  • To change domain, click Remove domain (the trash icon), then attach the new one. The old domain stops being routed within a few seconds.

Errors and what they mean

Message Meaning Fix
"Activate domains before attaching a custom domain." The deployment has no canonical URL yet. Click Activate domains first.
"Enter a valid domain, e.g. app.yourdomain.com" The name is not a valid hostname. Remove https://, any path and any trailing space. Use lowercase.
"This domain is managed by us. Use the alias field instead." You entered an address under apps.bot-hosting.cloud. Use the Pretty alias field.
"That domain is already in use by another deployment." Another deployment verified this domain. Remove it from the other deployment, or ask its owner to.
"We can't see your DNS record yet. …" Public DNS does not return the expected CNAME or TXT yet. Check the record name and value, wait for propagation, then retry.
"This domain has just been claimed by another deployment." Someone else verified it just before you. Remove it from that deployment first.
"Slow down - retry in Xs." You clicked Verify now less than 15 seconds ago. Wait, then click again.
Red Cloudflare warning The record is proxied by Cloudflare. Switch it to DNS only (grey cloud).
No response on port DNS is fine but your app does not answer. See When you get a 502.
Certificate issues on first visit No certificate yet, which is normal before the first HTTPS visit. Open the domain once. If it keeps failing, check CAA, AAAA and Cloudflare above.
Browser certificate error after verification The domain points elsewhere, or a CAA record blocks issuance. Check the records with the live checks, then open the domain again.

Pretty alias errors

Message Fix
"Invalid alias. Use 1-63 lowercase letters, digits or hyphens (not starting/ending with a hyphen)." Use only a-z, 0-9 and -, without a hyphen at the start or the end.
"That alias is already taken. Pick another one." The name is used by another deployment, or it is your deployment's own canonical name. Pick another one.