BillingCDN resources overviewOrigin groupPurgePrefetchReports
Chosen image
Home/CDN/Getting Started/Create a CDN resource/For static files

Create a CDN resource for static assets only

You can create up to 30 CDN resources in one account. 

1. In the "CDN" section, click "Create CDN resource".

CDN resource

2. On the page that opens, select "Accelerate and protect only static files".

Acceleration and protection type

3. Set up an initial configuration of your CDN resource. 

Description (optional). You can add an internal comment about the CDN resource. It will not affect any setting, but it will be only displayed in the "CDN resources" section next to the resource CNAME.  

Origin. An origin is a source (e.g., a website, an application, a private bucket) from where the CDN resource will request the content. In the Gcore control panel, each origin is allocated to an origin group.

  • If you didn’t create the origin group, choose the Specify content origin option and follow our instructions to add an origin group (step 3).
  • If you created the origin group previously, choose the Select origins group option, click on the field, and select the required origin group.

Custom domain. Create a custom domain as cdn.[your website domain] for delivering static files via the CDN. For example, if your website is yourdomain.com, enter cdn.yourdomain.com. Dynamic content will be sent to users from yourdomain.com, while static files will be delivered from cdn.yourdomain.com. You can specify multiple domains in one go by clicking the "+" icon. Later in Step 5, you can configure your website to deliver different types of static files from separate domains. Please note that a custom domain such as cdn.yourdomain.com cannot be changed after creating a CDN resource. 

SSL. If you want to make your static files accessible over HTTPS, toggle on the "Enable HTTPS" feature. Choose one of two options: "Get free Let's Encrypt certificate" or "Add or select your own SSL certificate". When choosing the first one, an SSL certificate will be issued automatically for a domain of your CDN resource (cdn.yourdomain.com) after Step 4 of this instruction. If you select the second option, you can add your own certificate using the instruction Add an SSL certificate to transfer content over HTTPS.

Initial configuration

4. Add a CNAME record for the domain that you specified in Step 3 as cdn.yourdomain.com. You need to do it in your DNS provider's personal account. For a CNAME value, enter a subdomain shown in your Gcore personal account as *.gcdn.co. For example, in the screenshot below it is written as cl-2db15545.gcdn.co, so, for the cdn.yourdomain.com subdomain, you need to create a CNAME record with the value cl-2db15545.gcdn.co

If you specified additional domain names in Step 3, create CNAME records for them with the same value as well.

DNS setting

5. In the path of static files, replace the source domain with a custom domain of the CDN resource. For example, if a file path used to be yourdomain.com/images/image.jpg, change it to cdn.yourdomain.com/images/image.jpg. As a result, users will receive static files from the CDN cache, and only the requests to the files that haven't yet been cashed will be forwarded to your origin server.

  • If your site is built on a CMS (WordPress, Joomla, Drupal or other), you can replace a domain name in file paths using special plugins. You can find a necessary plugin and instructions for replacing the URLs in the "CMS Integration" section.
  • If your site is not built on a CMS, replace a domain name in the URLs of static files manually.
Integrate with your project

6. Optionally, you can activate additional features for your CDN resource. You can skip this step; you'll always be able to return to additional settings later.

Click "Confirm" to complete the creation and set-up of your CDN resource.

Quick option setup

The resource will be created automatically. You will see a page with its advanced settings. If there is no text box ... steps left in the upper-right corner, everything is ok and the resource is working. 

If you see the ... steps left text box, it means that something went wrong while creating or integrating the CDN resource. 

Setup guide in Control panel

To find out exactly where an error occurred, click the "Setup guide" button at the top. You will see a sliding panel indicating the status of each step of CDN resource creation.

Setup guide

If a step is configured correctly, it will be shown in the UI.

Configured correctly

If an error occurs, a corresponding message will appear.

Error message

In case of an error, go back to the instruction above and perform the necessary step again. If you need help, contact our support team via a live chat or support@gcore.com — we will help you.

Was this article helpful?

Not a Gcore user yet?

Learn more about our next-gen CDN

Go to the product page