# Agency custom domain

> Run the whole Leal app under your own address, such as app.youragency.com. Adding the DNS records, checking status and what changes once it's live.

An agency custom domain puts the whole app under your own address, such as app.youragency.com. Your clients sign in there, your branded web app installs from there, and their customers' sign-up pages and links use it. Anyone who signs up there joins your agency.

Open **Custom domain** in the agency menu.

## What uses this domain

- **Full white-label app access:** clients and your team can sign in and use the app at your address.
- **Customer-facing sign-up pages:** poster QR codes and sign-up links for your client stores, unless a store has its own custom domain.
- **The installable web app:** see [The branded web app](https://docs.getleal.com/agency/white-label/web-app).
- **Links in emails** to your clients and their customers.
- **Sign-ups:** a business that signs up on your domain becomes a client store waiting for your approval. See [Approving sign-ups](https://docs.getleal.com/agency/clients/sign-up-approvals).
- **Your legal pages** at `/terms` and `/privacy`. See [Legal pages](https://docs.getleal.com/agency/white-label/legal-pages).

## Set it up

1. Open **Custom domain** and click **Connect domain**.
2. Enter a subdomain you own, such as `app.youragency.com`, and click **Save domain**.
3. The page shows two CNAME records. Log in to your DNS provider and add both, copying the **Name** and **Target** of each:
   - one that points your subdomain at Leal
   - one starting with `_acme-challenge`, which lets Leal create the security certificate (SSL) for your domain
4. Come back to **Custom domain**. The status moves from **Registering…** to **Provisioning SSL…** to **Active**. Click **Check status** to check again.

DNS can take up to 24 hours. Most of the time it's much quicker.

## Use a subdomain

Use a subdomain such as `app.youragency.com` or `loyalty.youragency.com`, not your main domain (`youragency.com`). Your main domain is usually already pointing at your website, and the records Leal needs are made for a subdomain.

## Change or remove it

- **Edit** lets you change the domain. You'll need to add new DNS records for the new one.
- **Remove** takes the domain off, and links go back to the default domain. Check that nothing you've printed or shared still relies on your address first.

## Gotchas

- **Add both records.** Without the `_acme-challenge` record the certificate can't be created, and the status stays on **Provisioning SSL…**.
- **A poster's QR code holds the address in use when you print it.** Set up your domain before you print posters for clients.
- **Sign-ups on your domain are billed to you once approved.** Don't link your domain's sign-up page publicly unless you're happy to review sign-ups.

## Best practices

- Pick a name you'll keep. Changing it later means new DNS records and reprinting posters.
- Set it up before onboarding clients, so their first login and first posters already use your address.
- Test it by signing in at your domain in a private browser window.
