> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Set a custom domain

> Use a custom domain in FastPix player to brand video playback, boost trust, and control domain routing.

Use a custom domain in FastPix player to brand video playback, boost trust, and control domain routing.

You can use custom domains to stream video assets from a domain of your choice rather than the default fastpix.io. This guide will help you set up and use a custom domain with the FastPix player, enhancing your control over media delivery. Leveraging custom domains can enhance your branding, improve SEO, and increase user trust.

\


## Default behavior

By default, all FastPix video assets—including posters, storyboards, and media sources—are hosted on fastpix.io. This means that when you use the FastPix player without a custom domain, your video and image assets are streamed directly from FastPix servers.

\


## Set up a custom domain

\


To set up a custom domain with the FastPix player, follow these steps:

1. **Configure your DNS**: Point your custom domain to the appropriate FastPix asset servers. This typically involves setting up CNAME records in your DNS settings. For example:
   * `media.example.com` should point to `assets.fastpix.io `
   * `image.media.example.com` should point to `images.fastpix.com`
   * `stream.media.example.com` should point to `videos.fastpix.io `
2. **Verify domain configuration**: Ensure your DNS settings are correctly configured and propagated across the network.

\


## Provide the custom domain to FastPix player

Once your custom domain is set up, the next step is to inform the FastPix player about it using the `custom-domain` attribute or the `customDomain` property.

\


**HTML element example**

To use a custom domain with the FastPix player in an HTML element, include the `custom-domain` attribute with your domain:

```jsx
<fastpix-player  
  playback-id="PlaybackId"  
  custom-domain="example.com"  
  stream-type="on-demand"  
></fastpix-player> 
```

\


In this example, `media.example.com` is your custom domain. Internally, the FastPix player will expand this value to `image.media.example.com` for images and `stream.media.example.com` for video streaming.

\


Here's a more detailed example of how to integrate the FastPix player with a custom domain:

```html
<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="UTF-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
  <script src="https://cdn.jsdelivr.net/npm/@fastpix/fp-player@latest"></script>
    <title>FastPix Player with Custom Domain</title> 
</head> 
<body> 
    <h1>Welcome to My Custom Video Player</h1> 
    <p>This video is served from my custom domain, enhancing branding and trust.</p> 
    <fastpix-player  
        playback-id="your-playback-id"  
        custom-domain="example.com"  
    ></fastpix-player> 
</body> 
</html> 
```

\


## Understand custom domain behavior

When you specify a custom domain, the behavior is as follows:

* Videos will be streamed from `stream.<your-custom-domain>`.
* Images will be loaded from `image.<your-custom-domain>`.

For example, if your custom domain is `media.example.com`:

* Videos will be streamed from `stream.media.example.com`.
* Images will be loaded from `image.media.example.com`.

\


## Troubleshoot for custom domains

If you run into issues while setting up or using a custom domain with the FastPix player, consider these troubleshooting tips:

**Check your DNS configuration**: Ensure your DNS records are correctly configured and fully propagated.

**Inspect network requests**: Use your browser’s developer tools to inspect network requests and confirm that assets are being loaded from the correct custom domain.

**Review console logs**: Look for any errors or warnings in the browser console that could point to configuration issues.