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

# Custom CDN domain

Learn how to set up a custom CDN domain.

## Why set up a custom CDN domain?

By default, BeyondWords serves audio and video files from a BeyondWords CDN domain. Some organizations, however, require media to be delivered from their own domain.

Setting up a custom CDN domain allows your media files to be served from a subdomain you control, such as:

`bw.yourdomain.com`

This is commonly used when:

* **Security policies require allow-listing**\
  Some organizations restrict external domains. Serving audio and video from your own subdomain makes it easier to allowlist.
* **Corporate firewalls or network controls are in place**\
  Internal networks may block unknown CDNs but permit traffic from approved domains.
* **Brand and domain consistency is preferred**\
  Media assets can appear to come directly from your organization’s domain rather than a third-party domain.

Behind the scenes, the subdomain points to the BeyondWords CDN using DNS records. Once configured, listeners continue to receive the same fast, cached media delivery, but through your domain.

## Set up a custom CDN domain

To use the `mediaHost` setting, you must first configure a custom domain with BeyondWords.

This allows you to serve audio and video from your own domain, which can then be allowlisted by enterprise networks.

<Steps>
  <Step title="Choose a subdomain">
    For example, `bw.yourdomain.com`.
  </Step>

  <Step title="Share the subdomain with BeyondWords">
    We will configure this domain on our CDN (Azure Front Door).
  </Step>

  <Step title="Add a TXT record for verification">
    We will provide a TXT record to verify that you own the domain.

    For example:

    ```text theme={null}
    Type:  TXT
    Name:  _dnsauth.bw.yourdomain.com
    Value: <provided-by-beyondwords>
    ```

    Add this to your DNS settings.
  </Step>

  <Step title="Add a CNAME record">
    Once verification is complete, we will provide a CNAME target.

    Example:

    ```text theme={null}
    Type:   CNAME
    Name:   bw.yourdomain.com
    Value:  xyz123.a03.azurefd.net
    TTL:    3600
    ```

    This points your subdomain to BeyondWords infrastructure.

    <Note>
      Some DNS providers only require the subdomain part (e.g. `bw`) rather than the full hostname. Check your provider's documentation if you are unsure.
    </Note>
  </Step>

  <Step title="Wait for DNS propagation">
    DNS changes can take up to 24–48 hours to propagate, although most updates take effect within a few minutes.
  </Step>

  <Step title="SSL is issued automatically">
    Once DNS is configured and has propagated:

    * The domain is verified
    * An SSL certificate is issued automatically
    * HTTPS becomes available

    No additional setup is required on your side.
  </Step>

  <Step title="Configure the player">
    Once your domain is live, pass it into the player:

    ```text theme={null}
    mediaHost: "bw.yourdomain.com"
    ```

    Use the hostname only — do not include `https://`. The player handles the protocol automatically.
  </Step>
</Steps>

## How the custom CDN domain works

Media is normally served from:

```text theme={null}
https://cdn.beyondwords.io/audio/abc123.mp3
```

With a custom CDN domain, the same file is served from your domain:

```text theme={null}
https://bw.yourdomain.com/audio/abc123.mp3
```

This allows enterprise networks to allowlist your domain instead of BeyondWords domains.

## Important notes

* The custom CDN domain only affects audio and video delivery
* You may still need to allowlist:
  * `proxy.beyondwords.io` (player script)
  * `api.beyondwords.io` (API)
* [Magic Embed](/docs-and-guides/integrations/magic-embed/overview) does not automatically switch domains—you must use the `mediaHost` setting
