> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lazycloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom domains

> Serve an endpoint or ASGI app from a hostname you own.

Every deployed HTTP workload gets a LazyCloud hostname. Custom domains need a
Team or Business plan. They belong to your account and work in every workspace
you own.

## Register the domain

Registering a domain and verifying its DNS are account setup. A workload's
`domain` setting selects a registered hostname and creates no DNS records.

```bash theme={null}
uv run lazycloud domain add app.acme.com
```

The command prints a CNAME record to create at your DNS provider, and any
records needed to prove you own the name. Create them, then check:

```bash theme={null}
uv run lazycloud domain status app.acme.com
```

The status reports DNS and certificate progress. While verification is
pending, the records at your provider should match the command's output. The
hostname can serve HTTPS once its certificate is ready.

The dashboard has the same flow under Settings, then Domains.

## Point a workload at it

A workload names the hostname in its `domain` setting:

```python theme={null}
from lazycloud import App

app = App("custom_domain")


@app.endpoint(name="count", methods=["POST"], domain="app.acme.com")
def count_words(text: str) -> dict[str, int]:
    return {"words": len(text.split())}
```

Save this as `custom_domain.py`, replace `app.acme.com` with your verified
hostname, then run `uv run lazycloud deploy custom_domain:count_words`.
Send a request as in the
[quickstart](/getting-started/quickstart#call-it), with your custom
URL. The endpoint still requires authentication by default.

`@app.endpoint`, `@app.asgi`, and `@app.realtime` accept `domain`.
The hostname must be the registered domain or a name under it.

## Remove it

```bash theme={null}
uv run lazycloud domain list
uv run lazycloud domain remove app.acme.com
```

Removing a domain discards its certificate. Deployments keep their LazyCloud
hostnames.
