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

# Custom Domains

> Connect your Leap application to a custom domain

When your Leap application is ready for production, you may want to serve it from your own domain rather than the default Encore-provided URL. This guide walks you through the process of connecting a custom domain to your Leap application.

<Info>
  Custom domains are available for [Leap Pro plan](https://leap.new/#pricing) subscribers.
</Info>

## Setting up a Custom Domain

Follow these steps to connect your domain to your Leap application:

1. In your Leap project, click the **Deploy** button in the top-right corner
2. After deployment, click the **+ Custom Domain** button which will take you to the Domains settings page.
3. Click the **Add Domain** button to open the domain configuration modal

<img src="https://mintcdn.com/leap-6fad377a/UuEZFEHgAM4of4Te/assets/connect-domain.png?fit=max&auto=format&n=UuEZFEHgAM4of4Te&q=85&s=e6530414d9463c65744abb8835e4d4b5" alt="Add Domain Modal" width="1734" height="762" data-path="assets/connect-domain.png" />

In the Add Domain modal:

1. Enter your domain (e.g., `your-domain.com`)
2. The modal will show you the DNS record you need to add to your domain provider:

   ```
   Type: CNAME
   DNS Record: api.your-domain.com (your subdomain)
   Value: custom-domain.encr.app
   ```
3. Select the environment you want to assign the domain to.
4. Click **Add Domain** to complete the setup
5. Add the specified DNS record with your domain provider (see DNS Configuration section below)

<Info>
  Your custom domain comes with DDoS protection powered by Cloudflare WAF.
</Info>

## DNS Configuration

After adding your domain, you'll need to set up the appropriate DNS records with your domain registrar. Select your provider below for specific instructions.

<Tabs>
  <Tab title="Namecheap">
    1. Log in to your Namecheap account
    2. Go to **Domain List** and click **Manage** next to your domain
    3. Select the **Advanced DNS** tab
    4. Click **Add New Record**
    5. Enter the following details:
       * Type: CNAME Record
       * Host: Enter your subdomain (e.g., `api` for `api.your-domain.com`)
       * Value: `custom-domain.encr.app`
       * TTL: Automatic
    6. Click **Save All Changes**
  </Tab>

  <Tab title="GoDaddy">
    1. Log in to your GoDaddy account
    2. Navigate to **My Products** > **Domains**
    3. Select the domain you want to use
    4. Click **DNS**
    5. Under **Records**, click **Add**
    6. Select **CNAME** from the Type dropdown
    7. Enter the following details:
       * Host: Enter your subdomain (e.g., `api` for `api.your-domain.com`)
       * Points to: `custom-domain.encr.app`
       * TTL: 1 Hour
    8. Click **Save**
  </Tab>

  <Tab title="Cloudflare">
    1. Log in to your Cloudflare account
    2. Select your domain
    3. Go to the **DNS** tab
    4. Click **Add record**
    5. Select **CNAME** from the Type dropdown
    6. Enter the following details:
       * Name: Enter your subdomain (e.g., `api` for `api.your-domain.com`)
       * Target: `custom-domain.encr.app`
       * Proxy status: Proxied (recommended)
    7. Click **Save**
  </Tab>

  <Tab title="Google Domains">
    1. Log in to your Google Domains account
    2. Select your domain
    3. Go to **DNS**
    4. Scroll down to **Custom resource records**
    5. Enter the following details:
       * Name: Enter your subdomain (e.g., `api` for `api.your-domain.com`)
       * Type: CNAME
       * TTL: 1h
       * Data: `custom-domain.encr.app`
    6. Click **Add**
  </Tab>

  <Tab title="Other Providers">
    For other DNS providers, you'll need to:

    1. Log in to your domain registrar's account
    2. Locate the DNS or Domain Management section
    3. Look for an option to add a new DNS record
    4. Create a CNAME record with:
       * Host/Name: Your subdomain (e.g., `api` for `api.your-domain.com`) or `@` for root domain
       * Value/Target/Points to: `custom-domain.encr.app`
       * TTL: 3600 (1 hour) or the lowest available value
  </Tab>
</Tabs>

## Verifying Your Domain

After setting up the DNS record:

1. It may take some time for DNS changes to propagate (typically 15 minutes to 48 hours)
2. You can check the status of your domain on the Domains settings page
3. Once verified, your application will be accessible via your custom domain

## Troubleshooting

If you encounter issues with your custom domain setup:

* Verify that your DNS record is correct and matches the provided instructions
* Check if your DNS changes have propagated using a tool like [dnschecker.org](https://dnschecker.org)
* Ensure your domain doesn't have conflicting DNS records
* Contact support via the Encore Cloud dashboard if you continue to experience issues
