---
title: "Custom domain for your app in 2026: DNS and HTTPS set by your AI"
url: https://while.sh/en/guides/custom-domain/
author: "Aloïs Oddon, co-founder of Nextmap"
updated: 2026-11-19
---

# Put your app on your own domain name, over HTTPS, with your AI (2026)

Your app runs on its while.sh address, and you want it on yours. Ask your AI: it declares the domain, gives you the DNS records to add, and the HTTPS certificate follows.

> **The short version.** Your AI puts your app on your domain name: it gives you the DNS records, a CNAME for example, and the HTTPS certificate follows. What matters, like deleting a database, waits for a person's approval.

## Prerequisites

- An app deployed on while.
- A domain name, and access to its DNS zone at your registrar: Gandi, Cloudflare, Infomaniak…
- Your AI, connected to while over MCP.

## Step 1: Ask your AI for your domain

> You, to your AI: Put the app on planning.acme.com.

Your AI adds the domain to the service, in while.yaml:

```yaml titre="while.yaml"
services:
  - name: web
    domains: [planning.acme.com]
```

## Step 2: Add the DNS records

Your AI gives you two records: a TXT record, which proves the domain is yours, and a CNAME to `edge.while.cloud` (source 1). You add them at your registrar. The domain is checked every five minutes. Once it is verified, your AI deploys the app again, and it is served over HTTPS at your address.

## What your AI 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.


<figure class="illus"><img src="/illustrations/guide-fonction-garde-1200.webp" srcset="/illustrations/guide-fonction-garde-768.webp 768w, /illustrations/guide-fonction-garde-1200.webp 1200w" sizes="(min-width: 48rem) 46rem, 100vw" width="1536" height="1024" loading="lazy" decoding="async" alt="Your own domain name with while: credentials kept out of the AI's reach, every call logged in the history, a person's approval for what matters and a daily backup, in France" /><figcaption>Around every app, while keeps the credentials, the history, the approvals and the backups.</figcaption></figure>

## Put the app on your root domain

> You, to your AI: 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 AI gives you the A and AAAA addresses to add, along with the TXT proof.

## Follow the DNS verification

> You, to your AI: Is the domain ready?

Your AI 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 AI: Add www.acme.com too.

Your AI adds the domain to the list, and you add its DNS records the same way.

## Next steps

- [Deploy a static site](/en/guides/deploy-static-site/)
- [Deploy a Next.js app](/en/guides/deploy-nextjs/)
- [Show your app with a link and a password](/en/guides/share-app-with-password/)

## Sources

1. [Cloudflare, what is a CNAME record](https://www.cloudflare.com/learning/dns/dns-records/dns-cname-record/), 2026-11-02

## Questions

### How long before my domain works?

A few minutes: the time it takes for the records to propagate, for the domain to be verified, and then for your AI to deploy the app again.

### Do I have to pay for the HTTPS certificate?

No, it's included, and it renews without you.

### Can I keep my registrar?

Yes. You add two records there, three for a root domain, and nothing more.

### Where do my app and its data run?

In France, at Nextmap. The database is backed up every day, with a way back over 14 days, once a person approves.

### Does my AI see my credentials?

No. You paste them into while, the app uses them, and your AI never sees them. Every call is logged.
