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

# Domain Names

> Learn about how to manage domain names for your application.

For your session management application to work correctly and securely, you need to set up at least one custom domain name. After the set up, all requests to the Session API will be routed through this domain name.

## Domain Name Requirements

The custom domain name must be a valid domain name that is owned by you. It must be a subdomain of the domain name your application is hosted on. If you host your application on multiple domains, you can set up one for each domain.

For example, if your application is hosted on `example.com`, you can set up a custom domain name for Prelude's Session API like `session.example.com`.

<Note>
  Prelude's Session API uses [cookies](/session/documentation/cookies) to authenticate requests. Modern web browsers block third-party cookies by default. By setting up a custom domain name that is a subdomain of the domain your application is hosted on, you can ensure that the cookies won't be blocked.
</Note>

## How To Set Up a Custom Domain Name

<Steps>
  <Step title="Create a custom domain name">
    Perform a [`POST /v2/session/apps/{appID}/domains`](/session/api-reference/management/domains/create-domain) to the Session Management API. Ensure that the domain name is a subdomain of the domain your frontend application is hosted on.
  </Step>

  <Step title="Add the CNAME record to your DNS settings">
    Retrieve the CNAME record from the `cname_record` field in the response and add it to your DNS settings for your domain name. This step varies depending on your DNS provider.
  </Step>

  <Step title="Verify the custom domain name">
    Perform a [`POST /v2/session/apps/{appID}/domains/{domainID}/verify`](/session/api-reference/management/domains/verify-domain) to the Session Management API. Prelude will automatically try to verify the CNAME record, and issue an SSL certificate for your domain name.
  </Step>
</Steps>

You are all set! 🎉

You can now use the custom domain name to access your application.
