> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiI0YmI4ZWE2ZS0zYjcyLTQ0YjAtOTRiNi00MzFlOTkxYTk3NjkiLCJleHAiOjE3Nzg1MzEzMjgsImlhdCI6MTc3ODUzMTAyOH0.YaFUCHqE5tficeJRgC5XlCf0HmdjCcJj-FV0gpQ8nUo
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# Set up a custom domain

> Use the Fern Dashboard to configure your custom domain with DNS records for subdomain, subpath, or root domain hosting.

[Admins](/learn/dashboard/configuration/permissions) can use the [Fern Dashboard](https://dashboard.buildwithfern.com/) to configure any of the following custom domain types:

* **Subdomain**: `docs.mydomain.com`
* **Subpath**: `mydomain.com/docs`
* **Root domain**: `mydomain.com`

The Dashboard automatically provides the correct DNS records based on your domain type.

<Note>
  Alternatively, you can [set up your custom domain by manually configuring DNS records](/learn/docs/preview-publish/setting-up-your-domain).
</Note>

## Setup

<Steps>
  <Step title="Open the Dashboard">
    Navigate to the [Fern Dashboard](https://dashboard.buildwithfern.com/) and select your documentation site.
  </Step>

  <Step title="Add your custom domain">
    In the **Domains** section of the **Overview** tab, select **Add Custom Domain** and enter your domain. The dashboard displays the DNS records you need to configure.
  </Step>

  <Step title="Update the domain in `docs.yml`">
    Add your `custom-domain` to your `docs.yml` configuration:

    ```yaml docs.yml
    instances:
      - url: example.docs.buildwithfern.com
        custom-domain: docs.mydomain.com
    ```
  </Step>

  <Step title="Configure DNS records">
    Log in to your domain registrar and add the DNS records shown in the Fern Dashboard. The specific records depend on your domain type (subdomain, subpath, or root domain).
  </Step>

  <Step title="Verify the setup">
    Once you've added the DNS records, return to the Fern Dashboard to verify your domain. SSL is automatically provisioned for your domain, but it may take a few minutes to propagate globally.

    <Tip>
      Check that you can access your new docs site from a mobile device or incognito browser.
    </Tip>
  </Step>
</Steps>

## Multi-source settings

For [multi-source sites](/learn/docs/preview-publish/multi-source-docs) — where multiple repositories publish to the same custom domain on different sub-paths — the Dashboard exposes a **Multi-repo settings** card on the domain's **Settings** tab. These settings apply to the whole domain, not per sub-path.

The card configures:

* **Default path** — sets where users land at the bare root of the domain. Useful when a Fern-managed page serves as the root.
* **Search / Ask AI scope** — controls whether searches in one sub-path return results across all sub-paths (unified) or stay scoped to that sub-path (hierarchical).

See [Multi-source docs](/learn/docs/preview-publish/multi-source-docs) for the full setup walkthrough.