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

# Give an endpoint its own address

> Serve a Raily endpoint on your own domain, such as mcp.yourcompany.com, or on a Raily-hosted address with no DNS setup.

Every endpoint has a default address on Raily. You can add a second, branded address that agents use instead: either a subdomain you own, such as `mcp.yourcompany.com`, or a Raily-hosted address where you only pick the name.

A new address is an addition, not a replacement. The default address keeps working, and agents that already connected keep working without signing in again. Both addresses use the same sign-in, so an agent that connected on one is not asked to approve access again on the other.

> [!NOTE]
>
> Custom domains are available on paid plans and are turned on per Account. [Contact us](https://www.raily.ai/contact) to enable them.

## Before you start

* Open the endpoint: in **Search Rail**, select it in the **Your audience** panel. The **Custom domain** card is on the endpoint page.
* You need permission to manage resources in the endpoint's Organization. Without it, you can see the card's addresses but can't change them.
* The endpoint must be active.
* Each Account can have a limited number of custom domains (20 unless your plan says otherwise). Raily-hosted addresses count toward the same limit.

## Option 1: Use your own domain

Use a subdomain, such as `mcp.yourcompany.com`. Raily can't serve a root domain such as `yourcompany.com`.

You'll need access to your domain's DNS settings. If your domain has CAA records, add `amazon.com`, `amazontrust.com`, `awstrust.com` and `amazonaws.com` to them first. Otherwise the certificate can't be issued or renewed.

**1. Add the domain**

In the **Custom domain** card, type your subdomain in the field (for example `mcp.yourcompany.com`) and click **Add domain**. The domain appears with the status **Waiting for DNS** and the heading **Add these two records to your DNS**.

**2. Create the ownership record**

In your DNS provider, create the **TXT** record the card shows (labelled "proves you own the domain"):

* **Name**: `_raily-challenge.` followed by your domain, for example `_raily-challenge.mcp.yourcompany.com`
* **Value**: starts with `raily-verify=` followed by a code unique to this domain

Use the copy buttons next to each value so nothing gets mistyped.

**3. Create the routing record**

Create the **CNAME** record the card shows (labelled "points your domain to the endpoint"):

* **Name**: your domain, for example `mcp.yourcompany.com`
* **Value**: the target address shown in the card

Use a plain CNAME. If your provider proxies or flattens it (on Cloudflare, an orange cloud; elsewhere, ALIAS or ANAME), Raily can't see it. On Cloudflare, set the record to **DNS only** (grey cloud).

**4. Wait for Raily to finish**

You don't need to click anything else. While the page is open, the card checks your records every 20 seconds, and Raily keeps checking in the background after you close it. Each record gets a green check once Raily finds it. Then Raily issues a certificate for your domain and the status changes to **Active**. This usually takes a few minutes after your DNS changes are visible. Click **Check now** to check right away.

> [!TIP]
>
> The card shows **Name** as the full record name. Some providers, such as Cloudflare and GoDaddy, want only the part before your domain. For `mcp.yourcompany.com`, enter `_raily-challenge.mcp` for the TXT record and `mcp` for the CNAME, and the provider adds the rest.

Keep both records in place for as long as you use the domain. Raily renews the certificate automatically, and renewal needs them. If you remove the CNAME later, the card warns that your DNS no longer points at Raily. Put the CNAME back to clear it.

A domain that never proves ownership is removed automatically after 7 days, which frees the name. You can add it again at any time.

## Option 2: Use a Raily-hosted address

If you don't have a domain, or don't want to touch DNS, Raily can host the address for you.

**1. Switch to a hosted address**

In the **Custom domain** card, under the domain field, click **Use a Raily-hosted address**.

**2. Pick a name**

Type a name in the field. The card shows the rest of the address next to it. Use 3 to 40 characters: lowercase letters, digits and hyphens, with no hyphen at the start or end. A few common names, such as `www`, `api` and `support`, are reserved.

**3. Add it**

Click **Add address**. The status shows **Setting up** while Raily creates the DNS records and certificate. It changes to **Active** within a few minutes.

Raily looks after the DNS and the certificate of a hosted address. There is nothing for you to maintain.

## Use the new address

Once the status is **Active**, the endpoint's connect card shows your new address as the connect link, with the original listed as **Default URL (always works)**. Give the new address to anyone connecting an agent from now on. People who already connected with the default address can keep using it.

An endpoint can have more than one custom domain or hosted address. Each one appears in the card with its own status.

## What each status means

| Status | What's happening |
| - | - |
| **Waiting for DNS** | Raily is waiting for one or both of your DNS records, or for the certificate. |
| **Setting up** | A Raily-hosted address is being created. |
| **Active** | The address is live and agents can connect to it. |
| **Failed** | Setup stopped. The card says why. Fix the cause and click **Retry**. |
| **Removing…** | The address has already stopped serving. Cleanup finishes on its own in a few minutes. |

## Remove an address

Click **Remove** on the address, then **Remove domain** to confirm. Agents connected through that address lose access immediately. The default address keeps working.

For your own domain, delete its two DNS records once the address is removed. For a Raily-hosted address, Raily removes its DNS records for you.

## Next steps

> [card] [Connect to ChatGPT](https://docs.raily.ai/connect/chatgpt.md)
>
> Add an endpoint to ChatGPT

> [card] [Access](https://docs.raily.ai/features/access.md)
>
> Choose who can use an endpoint


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.