---
title: "Create a CDN Resource"
sidebar_label: "Create a CDN Resource"
description: "How to create a CDN resource"
sidebar_position: 3
---

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'
import Formbricks from '@theme/MDXComponents/Formbricks'

# Create a CDN Resource

A CDN resource is a set of settings that determine how content is delivered from the origin to CDN servers and sent from CDN servers to end users.

You can specify the following as the content origin:

* your own origin using your website's domain or IP address;
* or an S3 [bucket](/s3/).

You can also [duplicate](/cdn/resources/duplicate-resource.mdx) an already created resource.

<Tabs queryString="create-resource">
  <TabItem value="own-source">
    <TabItemLabel>
      Your own origin
    </TabItemLabel>

    1. Ensure that you have [topped up your balance](/balance-and-payments/manage/top-up-balance.mdx) by 550 ₽.

    2. In the [control panel](https://my.selectel.ru/cdn-v3), on the top menu, click **Products** and select **CDN**.

    3. Select the content delivery optimization type. You will be able to [change the optimization type](/cdn/content/content-delivery-optimization.mdx#change-optimization-type) after creating the CDN resource.

       * Static — suitable for delivering small files: images, video and audio files, text formats;
       * or Large files — suitable for delivering large files without loss of quality, such as videos. Files are cached and delivered in parts (slices) using HTTP Range requests. By default, the slice size is 16 MB; you can [change the slice size](/cdn/content/content-delivery-optimization.mdx#change-slice-size) after creating the CDN resource.

    4. In the **Address** field, specify your website domain or IP address.

    5. Click **Create**. When a CDN resource is created, a default domain is automatically generated. Files that the CDN server will distribute will be accessible via a link like `*.selcdn.net`. You can leave the default domain or [add a personal domain](/cdn/resources/add-personal-domain.mdx).
  </TabItem>

  <TabItem value="s3">
    <TabItemLabel>
      S3
    </TabItemLabel>

    1. Ensure that you have [topped up your balance](/balance-and-payments/manage/top-up-balance.mdx) by 550 ₽.

    2. If you do not have a bucket in Selectel S3 yet, create a public bucket and upload your files to it by following the [S3: Quick Start](/s3/quickstart.mdx) guide.

    3. In the [control panel](https://my.selectel.ru/cdn-v3), on the top menu, click **Products** and select **CDN**.

    4. Select the content delivery optimization type. You will be able to [change the optimization type](/cdn/content/content-delivery-optimization.mdx#change-optimization-type) after creating the CDN resource.

       * Static — suitable for delivering small files: images, video and audio files, text formats;
       * or Large files — suitable for delivering large files without loss of quality, such as videos. Files are cached and delivered in parts (slices) using HTTP Range requests. By default, the slice size is 16 MB; you can [change the slice size](/cdn/content/content-delivery-optimization.mdx#change-slice-size) after creating the CDN resource.

    5. In the **Address** block, specify the address of the public bucket in the format `*.selstorage.ru` without a protocol. You can view the bucket address in the [Control Panel](https://my.selectel.ru/storage/): in the top menu, click **Products** → **S3** → select a project → **Buckets** section → bucket page → **Domains** tab → **Primary domain**.

    6. Click **Create**. When a CDN resource is created, a default domain will be automatically generated. Files that the CDN server will distribute will be accessible via a link like `*.selcdn.net`. You can leave the default domain or add a [personal domain](/cdn/resources/domains.mdx#personal-domain).

    7. Open the page of the created resource → **Source** tab.

    8. In the **Hostname** block, in the **Hostname when requesting the source** field, specify the address of the public bucket you added in step 5.
  </TabItem>
</Tabs>

<Formbricks />
