# App addresses and company domains

> Each setup's own address, and a company domain added with two DNS records.

Source: https://diakrin.com/docs/domains

Every AWS setup gets its own address for its apps automatically, and owners, admins or Technical administrators can add a domain the company owns by adding two DNS records.

## Before you start
| You supply | Example | Comes from |
|---|---|---|
| The setup | Production | **Cloud → Setups** |
| A domain your company owns | `acme.dev` or `apps.acme.dev` | Your DNS provider |
| Access to that domain's DNS records | Someone in IT | Your DNS provider's console |

## The Diakrin address
Each setup has its own Diakrin address, `*.<label>.p.diakrin.dev`, where `<label>` is ten random letters and digits. Diakrin makes it when the setup is created and ready; nobody has to do anything. On AWS the DNS zone, certificate and CloudFront distribution are made in the setup's own account and only one NS record is written in Diakrin's `p.diakrin.dev` zone. On Google Cloud the zone, certificate, load balancer and gateway are made in the setup's project; that step runs on Diakrin's servers behind a switch, and a failure is not shown in the console today. Apps open at `https://<app>.<label>.p.diakrin.dev` and their previews at `https://<app>-preview.<label>.p.diakrin.dev`, so a setup's address is also where its previews live. Two setups never share an address, and deleting one setup never affects another.

Diakrin checks the address against public DNS every day. If Diakrin's own record for it drifts, Diakrin rewrites it. If the address stops answering, the setup's **Addresses** show **Needs attention** with "The Diakrin address does not answer. Diakrin is repairing it; nothing to do." and IT is notified. It is never shown as **Ready** while it does not answer.

## See every setup's addresses
**Cloud → Domains** lists every AWS setup with its workspaces, its Diakrin address, its company domain and its status. **Needs attention** filters the setups whose Diakrin address or company domain needs a fix. Select a setup to open its **Addresses**, where a company domain is connected.

## Connect a company domain
On AWS, open the setup under **Cloud → Setups** and find **Addresses**.

```steps
Type the name | Owner, admin or Technical administrator | Select **Connect a domain** and type the exact name, for example `acme.dev`. Apps then open at `<app>.acme.dev`; Diakrin adds nothing to the name.
Add two records | IT, at your DNS provider | Diakrin shows two CNAME records: `*.acme.dev` to the setup's edge, and a validation record that proves you own the name. Leave both in place while you use the name.
Certificate and edge | Diakrin | Amazon issues one certificate for both addresses in your AWS account once the validation record is found; Diakrin then adds the name to the setup's edge.
Ready | Diakrin | When `*.acme.dev` resolves to the setup, apps answer on both addresses. Links and emails still use the Diakrin address.
Make primary | Owner, admin or Technical administrator | Select **Make primary**: links, shares and emails use the company name, and the Diakrin address redirects to it. **Use Diakrin address** switches back. No app is redeployed.
```

> [!WARNING]
> Connecting your own company domain to a setup is planned, not available yet. **Connect a domain** answers "Available soon. This setup is updating automatically; nothing to do." for every setup today, and it is not available on Google Cloud setups. The steps below describe what will happen when it ships.

Nothing changes for people until the name is ready. A request still waiting for the records after 7 days is cancelled.

## Names you can use
- A name your company owns, at any depth: `acme.dev`, `apps.acme.dev`.
- Not a name under `diakrin.dev` or `diakrin.com`, and not a public suffix such as `co.uk`.
- One company name per setup. Two setups need two names, for example `us.acme.dev` and `eu.acme.dev`.
- Typing a name reserves nothing. If two setups wait on the same name, the first whose certificate is issued gets it and the other request is cancelled.

## When the records break
Diakrin checks the company name every day while the setup runs.
- If the `*.acme.dev` record is removed or points elsewhere, the setup shows **Needs attention** and IT is notified. If it is still broken after 1 hour while the company name is primary, the Diakrin address becomes primary again, so it stops redirecting to a name that does not work.
- If the certificate can no longer renew (for example the validation record was removed), IT is notified. If renewal still fails 14 days before the certificate expires, the setup returns to the Diakrin-only certificate.

The Diakrin address keeps working whatever happens to your DNS records.

## Remove a company domain
A request whose certificate is not issued yet is cancelled at once with **Cancel**: the name is free again, and you can delete any record you added. For a connected name, the Diakrin address must be primary first; select **Use Diakrin address** if needed. Then select **Remove**: Diakrin takes the name off the setup's edge and lists the two records to delete at your DNS provider. The removal finishes when both records are gone.

## Delete a setup with a company domain
Remove the company domain first. You can continue without waiting: deleting an AWS setup removes it from Diakrin only. Its resources, including the CloudFront distribution, stay in your AWS account, and the two records keep pointing at them until you delete the records.

## If it fails
| Symptom | Cause | Fix |
|---|---|---|
| "This name is shared by many owners" | The name is a public suffix such as `co.uk` | Use a name your company owns under it, such as `acme.co.uk` |
| "This name is already connected to another setup" | Another setup holds the name | Use another name, such as `us.acme.dev` |
| Still "Waiting for 2 records" | One or both records are missing or mistyped | Copy both records again from **Addresses** and check them at your DNS provider |
| Cancelled after 7 days | The records were not found in time | Connect the name again and add both records |
| **Needs attention** on the company domain | The `*.` record was removed or points elsewhere | Put the record back as **Addresses** shows it |
| **Needs attention** on the Diakrin address | The Diakrin address stopped answering in the daily DNS check | Nothing to do: Diakrin is repairing it and IT is notified. Apps open there again once it answers |

## Older organization domains
Before November 2026, owners could add a company DNS zone for the whole organization under **Domains** and request a hostname per app, and **Preview links** had their own organization setting. That model was retired: every setup now has its own Diakrin address, and a company domain is connected per setup.

- The old zones, their app hostnames and the preview-link setting are gone from Diakrin. Apps moved to their setup's own address on their next update.
- Nothing was deleted in your cloud. A DNS stack, hosted zone or record that Diakrin created for an old zone stays in your account until you delete it; Diakrin no longer uses it.
