Go to the CDN page and click Create CDN resource.
Select Accelerate and protect only static files on the open page, then click Confirm.
Fill in the fields to configure your CDN resource on the open page.
1. (Optional) Add Description. Enter an internal comment about the CDN resource. This will not affect any settings but will only be displayed in the CDN resources section next to the resource CNAME.
2. Configure the 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 customer portal, each origin is allocated to an origins group.
There are two options for the Origin:
3. Specify the Custom domain. Assign a custom domain as cdn.[your website domain]
for delivering static files via CDN. For example, if your website is yourwebsite.com, enter cdn.yourwebsite.com. Dynamic content will be sent to users from yourwebsite.com, while static files will be delivered from cdn.yourwebsite.com.
You can specify multiple domains by clicking the "+" icon. 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.
4. Click Confirm.
Add a CNAME record for the domain specified in Step 3 as cdn.yourwebsite.com. Do so in your DNS provider's personal account. For a CNAME value, enter a subdomain shown in your Gcore customer portal as *.gcdn.co
.
For example, in the screenshot below the subdomain is cl-1ab23456.gcdn
.co, so, for the cdn.yourdomain.com subdomain, you need to create a CNAME record with the value cl-1ab23456.gcdn.co
.
If you specified additional domain names in Step 3, create CNAME records for them with the same value.
1. Go to the admin panel of your origin website and change the URLs of static files.
Replace the Origin Source domain with a custom domain of the CDN resource either by script or manually. For example, if a file path used to be yourwebsite.com/images/image.jpg
, change it to cdn.yourwebsite.com/images/image.jpg
. As a result, users will get static files from the CDN cache, and only the requests to the files that haven't yet been cached will be forwarded to your origin server.
If your site is built on a CMS (such as WordPress, Joomla, or Drupal) you can replace a domain name in file paths using special plugins. Find the right plugin and discover instructions for replacing the URLs in our guide on integrating CDN with CMS
2. Go back to the Gcore Customer Portal and click Confirm.
That’s it! The CDN resource creation is completed. You will be redirected to the CDN resource settings, where you can configure advanced settings.
If there is no text ... steps left box in the upper-right corner, everything is ok, and the resource is working.
If you see the ... steps left box, something went wrong while creating or integrating the CDN resource.
To find out exactly where an error occurred:
1. Click Setup guide.
You will see a sliding panel indicating the status of each step of CDN resource creation.
2. Click Check DNS setup status.
3. Click Next in the “Setup your DNS section.” Click Check your integration.
If there are integration issues, you will see an error message. Contact support team or retry the integration according to our instructions.
Was this article helpful?
Learn more about our next-gen CDN