# Custom Domain

## 🧭 Overview

You can map your own domain (e.g. `yourdomain.com`) or a subdomain (e.g. `dash.yourdomain.com`) to an application hosted on Discloud. The platform serves traffic through your app's [Discloud subdomain](https://docs.discloud.com/en/faq/general-questions/how-to-create-a-subdomain) using two A records pointing to our IPv4 addresses and validates ownership via TXT records.

<figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2FMHNQjr3RO5nJnpsSZ5Vt%2Fcustom-domain-flow.png?alt=media&#x26;token=0d7254c8-d32e-45ac-b95b-6d9b21821182" alt="Custom domain flow diagram"><figcaption></figcaption></figure>

***

## 📋 Requirements

{% hint style="success" %}
[Diamond plan or higher](https://discloud.com/plans) is required to host websites or APIs.
{% endhint %}

{% hint style="success" %}
[App already hosted](https://docs.discloud.com/en/how-to-host/websites-and-apis) using a Discloud subdomain (e.g. `example.discloud.app`)
{% endhint %}

{% hint style="success" %}
A registered domain you control (Cloudflare, Hostinger, GoDaddy, Namecheap, etc.)
{% endhint %}

{% hint style="success" %}
Ability to add / modify A and TXT records
{% endhint %}

***

## 🏗️ Add Your Domain (Dashboard)

{% stepper %}
{% step %}
Open the [Discloud Dashboard](https://discloud.com/dashboard) → Custom Domain section.
{% endstep %}

{% step %}
Enter your domain (e.g. `yourdomain.com`). Optionally specify a subdomain (e.g. `dash`).
{% endstep %}

{% step %}
Click **Register** and then the **DNS** button. When you click it, you will see the records you need to configure (A and, if required, TXT tokens).
{% endstep %}
{% endstepper %}

<div data-full-width="false"><figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2Fgit-blob-00c70eacf100cbcfe9c34f1895d7584132f1b55f%2FWebsite-Custom-Domain%20(1).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2Fgit-blob-750c2673d1a5fe6219b6ee2ea94acd5fd6c35c02%2FWebsite-Custom-Domain-DNS-A.png?alt=media" alt="List of A records showing 75.2.96.173 and 99.83.186.151"><figcaption></figcaption></figure></div>

***

## ✅ Verify & Configure DNS

Although any DNS provider works, below are tabbed scenarios for clarity.

{% tabs %}
{% tab title="Root Domain" %}
**Records**

| Type             | Name                   | Value              |
| ---------------- | ---------------------- | ------------------ |
| A                | `@` (or provider root) | `75.2.96.173`      |
| A                | `@` (or provider root) | `99.83.186.151`    |
| TXT *(if shown)* | `@` / provided         | Verification token |
| {% endtab %}     |                        |                    |

{% tab title="Subdomain" %}
**Example: `dash.yourdomain.com`**

<table><thead><tr><th width="144">Type</th><th width="353">Name</th><th>Value</th></tr></thead><tbody><tr><td>A</td><td><code>dash</code></td><td><code>75.2.96.173</code></td></tr><tr><td>A</td><td><code>dash</code></td><td><code>99.83.186.151</code></td></tr><tr><td>TXT <em>(if shown)</em></td><td>Provided (<code>dash</code> / <code>_discloud-verification</code>)</td><td>Verification token</td></tr></tbody></table>

Multiple subdomains (e.g. `api`, `app`) repeat this pattern independently.
{% endtab %}
{% endtabs %}

{% hint style="warning" %}

#### **Cloudflare Proxy**

If you use **Cloudflare**, it is mandatory to disable the **Proxy** (ensure it is set to **DNS Only** / **Grey Cloud**, not the Orange one). This ensures correct SSL certificate issuance.
{% endhint %}

<figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2Fgit-blob-1937d5d9929fd39548145870baac9c6b47eb6da9%2FCloudflare-Custom-Domain-DNS.png?alt=media" alt="Cloudflare dashboard showing DNS Only (Grey Cloud) for A records"><figcaption></figcaption></figure>

***

## 🔄 Rebuild the App

After DNS resolves and tokens validate, open the linked app and trigger Rebuild so the binding becomes active.

<div data-full-width="false"><figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2FjKI96KzGB4rLqeGDqNdd%2FWebsite-Applications_Subdomain.png?alt=media&#x26;token=c5e95444-2491-442c-b281-96c2efbc34bd" alt="App list showing custom domain"><figcaption></figcaption></figure> <figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2FpAMyCsxrkEABAjJ737Lz%2Fimage.png?alt=media&#x26;token=4b9496b4-4654-45ed-91f4-4bd68d3c3769" alt=""><figcaption></figcaption></figure></div>

***

### 📡 **DNS Propagation**

* DNS changes typically propagate within a few minutes.
* However, **TTL values** and **resolver cache** may cause some delays.
* To verify changes worldwide, check [dnschecker.org](https://dnschecker.org/)
* If some POPs still display old records, wait and re-check later.

<figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2Frcud0pvMyXdYyWmwNU4Y%2Fdns-check-propagation.png?alt=media&#x26;token=f3ee234a-58a7-43be-abb9-5a8e79792fde" alt=""><figcaption></figcaption></figure>
