# Domains

> The address every app gets, how to add a domain of your own with its DNS records, how HTTPS is set up, and what does not work.

Every app gets an address from the platform as soon as it is deployed. You can add domains you own next to it. HTTPS is set up for each of them, with a certificate that renews by itself.

## The platform URL

The **Platform URL** is the address given to every app. It is under **Domains** and at the top of the app.

You can switch it off, for example once your own domain is live. If it is off and no custom domain is live, nothing answers for the app.

## Add a domain you own


1. **Add the hostname.**

   Open **Domains**, choose **Add a custom domain**, enter the hostname (`app.example.com`) and choose **Add domain**.

2. **Create the DNS records.**

   The dashboard shows the records to add: a type, a name and a value. Create them at your DNS provider, exactly as shown.

   | Your domain | Records |
   | --- | --- |
   | A subdomain, `app.example.com` | One `CNAME` record |
   | A root domain, `example.com` | An `A` and an `AAAA` record |

   A root domain is the name you registered. Where the ending has two parts, as in `example.co.uk` or `example.co.in`, that name is a root domain too, and `www.example.co.uk` is a subdomain of it.

   The name of a record is the part in front of your root domain, which is what most DNS providers ask for: `@` for the root domain itself, `www` for `www.example.com`, `www.shop` for `www.shop.example.com`.

3. **Wait for the check.**

   The domain shows **Waiting for DNS**. It is checked every few minutes. Once the records are found it becomes **Verified** and the certificate is issued.

4. **Open it.**

   When the certificate is **Active**, the app answers at your domain, over HTTPS.


> **Point the record straight at the app**
>
> A proxy or CDN of your own in front of the domain is not supported yet. If your DNS provider offers one for the record, switch it off.

## What a domain costs

The platform URL costs nothing. The first domain of your own on each app is free. Each further one costs $0.15 a month, counted by the second while it is connected. See [Billing](https://arrangic.com/docs/billing.md).

## HTTPS

There is nothing to set up. Each domain gets a certificate once its DNS records are in place, and the certificate is renewed for you. Requests over plain HTTP are sent to HTTPS.

## The primary domain

One domain is the primary one. Choose **Make primary** to change it. The `APP_URL` variable holds the primary address, with `https://`.

## Remove a domain

Choose **Remove domain**. Traffic to that hostname stops reaching the app and its certificate is released. Remove the DNS records at your provider as well.

## What does not work

- **Wildcards.** `*.example.com` cannot be added. Add each hostname by itself.
- **A domain that is in use elsewhere.** A hostname can belong to one app only.
- **An ending many domains share.** `co.uk` by itself is not a domain of your own. Add a name you registered under it, such as `example.co.uk`.

---

This page on the site: https://arrangic.com/docs/domains  
All pages of the documentation: https://arrangic.com/llms.txt
