# Give every app an address

With a default domain, every app gets a web address of its own as soon as you add it to a server that can use the domain. The address is the app's name under the domain: an app called Shop Front answers at `shop-front.apps.example.com`. Coresmith gets each address's certificate when the app goes live.

On Coresmith Cloud this is already done for you. Every app answers at its name under `coresmith.app`, like `shop-front.coresmith.app`.

## Set the default domain

Owners and admins can set it.

1. Open **Settings**, **General**.
2. On **Default domain for apps**, choose **Set a domain**.
3. Enter a domain you own, such as `apps.example.com`, and choose **Save**.

Coresmith then checks each of your connected servers. Every server gets a row on the card: **Ready** when its apps can use the domain, or **Not ready** with what's missing and any record to add.

## Point the domain at your servers

Do one of these.

- **Let Coresmith add the records.** If the domain's DNS is on Cloudflare, give Coresmith a Cloudflare token under **Settings**, **General**, **Address**, with **Zone**, **DNS**, **Edit** for the domain's zone. Coresmith then adds each app's record itself, pointed at the server the app runs on. This works with any number of servers.
- **Add a wildcard record.** At your DNS provider, add an A record for `*.apps.example.com` pointing at your server's IPv4 address, and an AAAA record for its IPv6 address if it has one. The card shows the exact records with copy buttons. A wildcard reaches one server, so apps on your other servers need the Cloudflare token or domains of their own.

A server that takes visitors [through Cloudflare](/docs/servers/ipv4-through-cloudflare) needs the token, since its records go through the tunnel. Use the zone itself as the default domain, such as `example.com`. Cloudflare's free certificate covers names one level under the zone, so `shop.example.com` works, but `shop.apps.example.com` would show visitors a certificate error.

## Which apps get an address

- Apps you add from now on get one straight away on a server marked **Ready**, even when you type a domain of your own. Your domain stays primary, and the default address answers beside it.
- Apps you added before get theirs at their next deploy.
- An app's address uses its name in lowercase, with hyphens for spaces, and without dots or other symbols. If another app already uses that address, Coresmith adds your team's address to the name, such as `shop-front-monoven.apps.example.com`.

The app's page lists the address on its **Domains** card, marked **default**, or **primary** when it's the app's only domain.

## Take an address off an app

On the app's **Domains** card, choose the remove button beside the address, then **Remove**. The app keeps its other domains, and Coresmith doesn't give the address back on its own. To bring it back, choose **Add the address** on the same card.

## Change or turn off the default domain

Choose **Change** on the card to use another domain. Each app moves to the new domain at its next deploy.

Choose **Turn off** to stop giving out addresses. Apps keep theirs until their next deploy, and then lose them.

## On Coresmith Cloud

Every app gets its name under `coresmith.app`, and there's nothing to set up. A name that could pass for Coresmith's own, such as `admin` or `login`, gets your team's address added: a team at `acme` gets `admin-acme.coresmith.app`. You can't add other `coresmith.app` names by hand, but you can add domains you own as usual. [Add a domain](/docs/apps/domains).
