Put your app on your own domain name, over HTTPS, from your AI agent
Your app runs on its while.sh address, and you want it on yours. Ask your AI agent: it declares the domain, gives you the DNS records to add, and the HTTPS certificate follows.
By Aloïs Oddon, co-founder of Nextmap. Facts checked on November 2, 2026.
Prerequisites
- An app deployed on while.
- A domain name, and access to its DNS zone at your registrar: Gandi, Cloudflare, Infomaniak…
- Your AI agent, connected to while over MCP.
Step 1: Ask your agent for your domain
You, to your agent: Put the app on planning.acme.com.
Your agent adds the domain to the service, in while.yaml:
services:
- name: web
domains: [planning.acme.com]
Step 2: Add the DNS records
Your agent gives you two records: a TXT record, which proves the domain is yours, and a CNAME to edge.while.cloud1. You add them at your registrar. The domain is checked every five minutes. Once it is verified, your agent deploys the app again, and it is served over HTTPS at your address.
What your agent does
The HTTPS certificate is obtained on the first visit, then renewed without you. Your visitors reach the same version of your app, whichever address they use.
Put the app on your root domain
You, to your agent: Put the app on acme.com, without www.
A root domain can’t take a CNAME. If your DNS host supports it, it takes an ALIAS (or ANAME) record to edge.while.cloud. Otherwise, your agent gives you the A and AAAA addresses to add, along with the TXT proof.
Follow the DNS verification
You, to your agent: Is the domain ready?
Your agent reads the domain’s status in while, whether the proof was found or the certificate obtained, and tells you what to fix.
Add a second domain
You, to your agent: Add www.acme.com too.
Your agent adds the domain to the list, and you add its DNS records the same way.
In the docs: HTTPS address and Custom domain.
Next steps
Sources
- Cloudflare, what is a CNAME record, accessed November 2, 2026