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

# Custom Domain Setup

> Configure your own domain for the Nextoria Hub dashboard and client portal.

## Overview

Nextoria Hub supports custom domains for two surfaces:

| Surface             | Default URL                      | Custom Domain Example   |
| ------------------- | -------------------------------- | ----------------------- |
| **Client Portal**   | `your-workspace.nextoriahub.com` | `portal.youragency.com` |
| **Self-Hosted App** | *(your server IP)*               | `app.youragency.com`    |

## Client Portal Custom Domain

The client portal custom domain is available on **Growth and Scale** plans.

<Steps>
  <Step title="Enter your domain">
    In Nextoria Hub, go to **Settings → Client Portal → Custom Domain** and enter your desired subdomain (e.g. `portal.youragency.com`).
  </Step>

  <Step title="Add a CNAME record">
    In your DNS provider (Cloudflare, Route 53, Namecheap, etc.), add:

    | Type  | Name     | Value                    |
    | ----- | -------- | ------------------------ |
    | CNAME | `portal` | `portal.nextoriahub.com` |

    If you're using Cloudflare, set the proxy status to **DNS only** (grey cloud) initially for verification.
  </Step>

  <Step title="Verify the domain">
    Back in Nextoria Hub, click **Verify Domain**. The system checks for the CNAME record. This typically resolves within a few minutes, but can take up to 48 hours.
  </Step>

  <Step title="SSL provisioning">
    Once verified, an SSL certificate is automatically issued via Let's Encrypt. The portal will be live at `https://portal.youragency.com` within minutes of verification.
  </Step>
</Steps>

<Tip>
  Once SSL is provisioned and verified, you can safely enable the **Cloudflare
  proxy** (orange cloud) for DDoS protection and performance benefits.
</Tip>

## Troubleshooting DNS

**Verification failing?**

* Confirm the CNAME record is saved and active in your DNS provider
* Use `dig portal.youragency.com CNAME` to verify the CNAME is resolving correctly
* Check that there's no A record for the same subdomain conflicting with the CNAME
* Wait at least 15 minutes before retrying — some DNS providers have propagation delays

**SSL not loading?**

* Confirm the domain is fully verified in Nextoria Hub before enabling Cloudflare proxy
* Ensure no other TLS configuration is conflicting (especially if self-hosted with your own nginx)

## Self-Hosted Custom Domain

If you're running the self-hosted deployment, configure your domain in the `.env` file:

```env theme={null}
APP_URL=https://app.youragency.com
```

Then configure your DNS with an A record pointing to your server's IP:

| Type | Name  | Value            |
| ---- | ----- | ---------------- |
| A    | `app` | `YOUR_SERVER_IP` |

SSL setup is handled by Certbot inside the included Nginx service. See [Self-Hosted Deployment](/deployment/self-hosted#ssl-configuration) for the full SSL setup commands.
