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

# Custom CDN resources for Video Streaming

> Set up a custom CDN resource for Video Streaming to add custom domains, geo-blocking, secure tokens, and per-GB billing.

Video Streaming includes integrated CDN delivery by default. A custom CDN resource is a separate CDN product that uses the Video Streaming subdomain as its origin, placed in front of streaming delivery and managed independently. This enables custom domains, access policies, secure tokens, and caching settings that the integrated CDN does not expose.

## Delivery approaches

The table below shows where the two approaches differ:

| Feature | Default streaming CDN | Custom CDN resource |
| - | - | - |
| Billing model | Per-minute, all-inclusive | Per-GB (bandwidth only) |
| Custom domains | Not available | Supported |
| Geo-blocking | Not available | Country access policies |
| Referrer validation | Not available | Domain restrictions |
| IP allowlists/blocklists | Not available | IP access policies |
| Secure tokens | Not available | Configurable |
| Advanced caching | Default settings | Full control |
| Separate policies per content type | Not available | Multiple resources |

## Billing

The default streaming CDN is all-inclusive: transcoding, storage, and bandwidth are billed together per minute of content streamed. A custom CDN resource adds a separate per-GB bandwidth charge on top of the existing streaming costs — transcoding and storage remain covered by the streaming plan.

## Custom CDN resource setup

Video Streaming must be active before creating a custom CDN resource.

**1. Activate CDN product**

1. Log in to the [Gcore Customer Portal](https://portal.gcore.com/)
2. Navigate to **CDN** in the main menu
3. Click **Activate CDN service** if not already active
4. Select a paid tariff that fits the bandwidth requirements

**2. Create a CDN resource**

1. Navigate to **CDN** > **CDN resources**
2. Click **Create CDN resource**
3. Configure the resource:
   * **Origin source:** the Video Streaming subdomain (e.g., `12345.gvideo.io`)
   * **Add domain** (optional): a custom domain for branded delivery (e.g., `video.example.com`)
4. Click **Create resource**
5. In the resource settings, set **Origin pull protocol** to **HTTPS** (General section)

If a custom domain is added, create a CNAME DNS record pointing to the CDN resource and attach an SSL certificate to serve content over HTTPS. The [CDN resource guide](/cdn/about-cdn-resources-interface-how-it-is-arranged) covers the full creation flow.

**3. (Optional) Configure access policies**

1. Navigate to **CDN** > **CDN resources** and select the resource
2. In the left sidebar under **Options**, select **Access**
3. Enable the policies needed for this resource. Each policy supports **Allow by default** (allow all except listed entries) and **Block by default** (block all except listed entries) modes:

| Policy | Controls | Notes |
| - | - | - |
| [Country access policy](/cdn/cdn-resource-options/security/control-access-to-the-content-with-country-referrer-ip-and-user-agents-policies#country-access-policy) | Countries where content can be delivered | Use for broadcasting rights — restrict to specific regions or block individual markets |
| [Referrer access policy](/cdn/cdn-resource-options/security/control-access-to-the-content-with-country-referrer-ip-and-user-agents-policies#allow-referrer-policy) | Domains that can embed or request content | Add domains with wildcard support: `*.mywebsite.com` allows all subdomains |
| [IP access policy](/cdn/cdn-resource-options/security/control-access-to-the-content-with-country-referrer-ip-and-user-agents-policies) | IP addresses or CIDR ranges | Use for corporate intranets, partner delivery, or blocking bot networks |
| [User agents policy](/cdn/cdn-resource-options/security/control-access-to-the-content-with-country-referrer-ip-and-user-agents-policies) | Browsers or client identifiers | Use to block scrapers or restrict delivery to specific apps |

For token-based access control, configure [Video secure tokens](/streaming/interaction-with-cdn/video-secure-token) separately — these are not in the **Access** section.

**4. Request Streaming Rules**

[Gcore Support](mailto:support@gcore.com) must apply `Streaming Rules` to the CDN resource before streaming traffic is routed correctly. Provide the CDN resource ID and the streaming client ID when contacting support.

> [!WARNING]
>
> Streaming will not work on a custom CDN resource without this support configuration.

**5. Update application URLs**

Once support confirms the setup is complete, replace `clientID.gvideo.io` with the custom domain in all video URLs and verify playback:

```text theme={null}
Before: https://12345.gvideo.io/videos/12345_ABcdefg123HiJ/master.m3u8
After:  https://video.mywebsite.com/videos/12345_ABcdefg123HiJ/master.m3u8
```

## Multiple CDN resources

Multiple custom CDN resources pointing to the same streaming origin can each carry different access policies. This enables content segmentation without duplicating the stream:

| Domain | Access policy | Use case |
| - | - | - |
| `public.mysite.com` | No restrictions | Free, public content |
| `protected.mysite.com` | Secure tokens | Paid/private content |
| `us-only.mysite.com` | Country: US only | US-specific content |
| `eu-only.mysite.com` | Country: EU only | EU-specific content |

Each resource has separate billing, monitoring, and policy configuration.

## Troubleshooting

Most issues with custom CDN resources fall into one of the categories below. Check the CDN resource status in the Customer Portal before investigating further — an inactive resource causes all four.

### CDN resource not delivering content

If the CDN resource returns 404 or 502 errors, confirm that support has applied `Streaming Rules`, verify the origin is set to the streaming subdomain, and confirm the CDN tariff is paid and active.

### Secure tokens not working

If requests with a secure token return 403, verify the secure token is enabled on the CDN resource, check that the token generation parameters match the CDN configuration (IP binding, expiration), and confirm the token has not expired. The [Video secure token](/streaming/interaction-with-cdn/video-secure-token) article covers configuration and implementation details.

### Geo-blocking not working

If content is accessible from blocked countries, verify the country access policy is enabled and saved, confirm the policy mode (Allow by default vs. Block by default), and allow 5–15 minutes for CDN propagation. Test from a VPN in the target country to confirm the policy is active.

### Custom domain not working

For DNS errors or certificate issues on a custom domain, verify the CNAME record points to the CDN resource, allow up to 24–48 hours for propagation, check the SSL certificate status, and confirm the CDN resource is active in the Customer Portal.

CDN caching rules and resource monitoring are configured through [CDN settings](/cdn).
