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

# Setting Up Custom Domains

> Learn how to configure your own domain for your Stardeck apps

## Overview

By default, all published Stardeck apps are automatically accessible at `app-slug.stardeck.site` where `app-slug` is your app's unique identifier.

Custom domains allow you to host your Stardeck apps on your own domain name (like `www.your-site.com`) instead of the default `app-slug.stardeck.site` subdomain. This guide will walk you through the entire process of setting up a custom domain.

## Prerequisites

Before you can set up a custom domain, you need:

1. **A published app** - Your app must be deployed and live on Stardeck
2. **Access to your domain's DNS settings** - You'll need to modify DNS records
3. **Organization admin access** - Custom domains are managed at the organization level

<Note>
  If your app isn't published yet, you'll need to deploy it first through the **Deployment** tab in
  your app settings.
</Note>

## Step 1: Add Domain to Your Organization

First, you need to add your domain to your organization's available domains:

1. **Navigate to Organization Settings**
   * Go to your **Dashboard**
   * Click the **Settings** icon in the top navigation
   * Select the [**Domains** tab](https://www.stardeck.ai/dashboard/settings?tab=domains)

2. **Add Your Domain**
   * In the "Add New Domain" section, enter your domain name
   * Enter just the domain (e.g., `example.com`) - Stardeck will automatically add the `www.` prefix
   * Click **Add Domain**

<Warning>
  Only `www` subdomains are supported. Stardeck will automatically add `www.` if not provided and
  help you redirect traffic from your apex domain.
</Warning>

## Step 2: Configure DNS Records

After adding your domain, you'll see DNS configuration instructions. You need to add several DNS records to validate ownership and enable SSL:

### Domain & SSL Validation (TXT Records)

You'll need to add **two TXT records** for validation:

**Domain Ownership Validation:**

* **Record Type:** TXT
* **Name/Host:** (provided by Stardeck, usually something like `_stardeck-domain-verification.www.example.com`)
* **Value:** (unique verification token provided by Stardeck)

**SSL Certificate Validation:**

* **Record Type:** TXT
* **Name/Host:** (provided by Stardeck for SSL validation)
* **Value:** (unique SSL verification token provided by Stardeck)

### Traffic Routing (CNAME Record)

**Main CNAME Record:**

* **Record Type:** CNAME
* **Name/Host:** `www.example.com` (your full domain)
* **Points To:** `cname.stardeck.dev`

### Apex Domain Redirect (Optional)

To redirect visitors from your apex domain (`example.com`) to your www subdomain (`www.example.com`):

* **Record Type:** A Record + URL Redirect (varies by DNS provider)
* **Name/Host:** `@` (or leave blank)
* **Redirect To:** `www.example.com`

<Note>
  The apex domain redirect setup varies by DNS provider. Look for "URL forwarding", "domain
  redirect", or similar features in your DNS provider's interface.
</Note>

## Step 3: Validate DNS Configuration

After adding all DNS records:

1. **Wait for propagation** - DNS changes can take up to 24 hours to fully propagate
2. **Check validation status** - In your organization's Domains tab, you'll see validation status for each step:
   * Ownership (TXT record validation)
   * SSL TXT (SSL certificate validation)
   * CNAME (traffic routing validation)
   * Redirect (apex domain redirect validation)
3. **Use validation buttons** - Click the "Check" buttons next to each validation step to manually trigger validation

## Step 4: Assign Domain to App

Once your domain is fully validated:

1. **Go to your app**
2. **Open App Settings** - Click the settings icon in your app
3. **Navigate to [Custom Domain tab](https://www.stardeck.ai/projects/~/dashboard/hosting/domain)**
4. **Select your domain** - Choose from your organization's validated domains
5. **Assign domain** - Click to assign the domain to your app

<Success>
  Your app will now be accessible at your custom domain! SSL certificates are automatically
  provisioned and renewed.
</Success>

## Common DNS Provider Examples

### Cloudflare

* TXT records: Add in DNS management with the exact name/host and value
* CNAME: Point `www.example.com` to `cname.stardeck.dev`
* Apex redirect: Use "Page Rules" or "Redirect Rules" to redirect `example.com` to `www.example.com`

### Name-cheap

* TXT records: Add in "Advanced DNS" section
* CNAME: Add CNAME record with host `www` pointing to `cname.stardeck.dev`
* Apex redirect: Use "Redirect Domain" feature in domain settings

### GoDaddy

* TXT records: Add in DNS management
* CNAME: Add with name `www` and points to `cname.stardeck.dev`
* Apex redirect: Use "Forwarding" in domain settings

## Troubleshooting

### DNS Not Propagating

* DNS changes can take up to 24 hours
* Use tools like `dig` or online DNS checkers to verify propagation
* Clear your browser cache and try incognito mode

### Validation Failing

* Double-check that TXT record names and values match exactly
* Ensure there are no extra spaces in DNS record values
* Some DNS providers require a trailing dot for full domain names

### CNAME Conflicts

* Remove any existing A records for the same subdomain
* CNAME records cannot coexist with other record types for the same name
* Ensure you're using `www.your-domain.com` and not the apex domain for the CNAME

### Still Having Issues?

If you're still experiencing problems:

1. Check the validation status in your organization's Domains tab
2. Use the "Check" buttons to manually trigger validation
3. Contact Stardeck support through your dashboard with your domain name and error details

***

*Need help with DNS configuration? Many DNS providers have specific guides for adding TXT and CNAME records. Check your provider's documentation or contact their support for assistance.*
