You can create up to 30 CDN resources in one account.
1. In the "CDN" section, click "Create CDN resource".
2. On the page that opens, select "Accelerate and protect only static files".
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.
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.
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.
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.
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.
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.
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.
If a step is configured correctly, it will be shown in the UI.
If an error occurs, a corresponding message will appear.
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?
Learn more about our next-gen CDN