---
title: "How to connect a custom domain to an AI-built app"
description: "Attach your own domain to a live Ample deployment, set the DNS record returned by the CLI, verify it, and activate TLS routing."
canonical_url: "https://ample.computer/guides/custom-domain-ai-built-app"
last_updated: "2026-07-30"
author: "Ample Computer"
---

# How to connect a custom domain to an AI-built app

Attach your own domain to a live Ample deployment, set the DNS record returned by the CLI, verify it, and activate TLS routing.

## The short version

First deploy the app and keep its deployment ID. Add the custom domain to that deployment, create one of the DNS records Ample returns, then verify the domain. Verification activates routing and provisions TLS after the required DNS record is visible.

## Who this is for

This guide is for builders who already have a live Ample app and want it to use their own domain.

## How to do it

1. **Find the live deployment ID.** Use the deployment_id returned by the successful deploy. A domain attaches to a specific deployment.

2. **Add the domain.** The response includes accepted DNS records and the target host or address for your domain.

   ```sh
   ample domain add <deployment_id> app.example.com
   ```

3. **Create the DNS record.** At your DNS provider, create the record in required_record, or another one from accepted_records. Subdomains use a CNAME to the app host. Apex domains cannot hold a standard CNAME, so they use an ALIAS to edge.ample.computer (your provider may call it ANAME or CNAME flattening). If your provider has no ALIAS for external hostnames, use the pinned A record instead.

4. **Verify and activate.** After DNS has propagated, ask Ample to verify the record and activate the route.

   ```sh
   ample domain verify app.example.com
   ```

5. **Test HTTPS.** Open the custom domain over HTTPS and test a real app path. Keep the generated Ample URL as a useful diagnostic route.

## What this supports

- Subdomains through accepted CNAME records
- Apex domains through ALIAS records, or a pinned A record where ALIAS is unavailable
- TLS provisioning after verification
- Custom routes to public web deployments

## Know the limits

- The app must have a live deployment before the domain can be attached
- DNS propagation time is controlled by your DNS provider and prior TTL
- Only records returned in accepted_records should be used

## Common failure modes

- **Verification says the record is missing** Compare the DNS record with accepted_records, wait for propagation, and verify again.
- **The apex domain was configured as a CNAME** Replace it with the ALIAS record returned for the apex domain, or the pinned A record if your DNS provider has no ALIAS.
- **The domain reaches an old release** Confirm the domain is attached to the intended live deployment and inspect the domain list for that deployment.

## Related guides

- [How to publish an AI-generated website](https://ample.computer/guides/publish-ai-generated-website)
- [How to get an app from localhost onto the internet](https://ample.computer/guides/localhost-to-internet)
- [How to redeploy after changing an AI-built app](https://ample.computer/guides/redeploy-ai-built-app)

## Machine-readable resources

- [llms.txt](https://ample.computer/llms.txt) | [AGENTS.md](https://ample.computer/AGENTS.md) | [sitemap.md](https://ample.computer/sitemap.md) | [OpenAPI](https://ample.computer/openapi.json)
