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

# Custom domain

> Point your own domain name to an application, with an automatic HTTPS certificate

Every application is reachable over HTTPS as soon as it is deployed, on an address generated from the public IP of your instance. That address is meant for testing; for production, attach your own domain name.

## Automatic HTTPS

The generated address already carries a Let's Encrypt certificate, issued and renewed by the platform. The same applies to a custom domain: once the domain resolves to your instance, the certificate is requested automatically.

## Add a domain

<Info>
  **Prerequisites**

  * A domain name you control
  * The application deployed and running
</Info>

<Steps>
  <Step title="Open the Domains tab">
    Open the application, then select the **Domains** tab.
  </Step>

  <Step title="Enter the domain">
    Type the host name to attach, for example `app.example.com`. The console checks it as you type and tells you what will happen.
  </Step>

  <Step title="Choose the service">
    An application made of several services asks which one receives the domain.
  </Step>

  <Step title="Apply">
    Select **Add**. The task applies the domain and the certificate is issued shortly after.
  </Step>
</Steps>

## Two cases

### The DNS zone is managed at OnetSolutions

If the parent domain has a DNS zone in the same organization, the console says so and creates the A record for you. Nothing to do on your side.

The record points to the public IPv4 address of the instance, with a 300 second TTL. An existing A record with a different value is updated, and its previous value is kept in the application history.

<Warning>
  A `CNAME` record on the same name, or several `A` records, block the operation. Remove them from your DNS zone first.
</Warning>

### The DNS zone is elsewhere

If the domain is hosted at another provider, the console shows the IP address to point to. Create an `A` record at your registrar, then add the domain: the console verifies that the name resolves to your instance before applying it.

DNS propagation can take from a few minutes to a few hours. If verification fails right after you create the record, wait and try again.

## Remove a domain

Removing a domain from the list and applying the change detaches it from the application. The DNS record itself is not deleted: remove it from your zone if you no longer need it.
