Go to the CDN page and click Create CDN resource.
Select Accelerate and protect static assets only and then click Confirm.
Fill in the fields to configure your CDN resource on the Set up initial configuration page.
Assign a custom domain as cdn.<your website domain>
for delivering static files via Gcore CDN.
For example, if your website is yourwebsite.com
, enter cdn.yourwebsite.com
. You will use that CNAME later to rewrite URLs in your website's source to deliver those resources through CDN.
You can specify multiple domains by clicking the plus (+) icon. In Step 5 you can configure your website to deliver different types of static files from separate domains.
After you create a CDN resource, you can’t change your custom domain, such as cdn.yourdomain.com
.
An origin is a source (e.g., a website, an application, a private bucket) from where the CDN resource will request your content. In the Gcore Customer Portal, each origin is allocated to an origin group.
There are two options for configuring an origin:
Specify content origin. Select this option if you haven't previously created an origin group. Follow our instructions to add an origin group (step 2).
Select origins group. Select this option if you already created the necessary origin group. Click the Select the origin group radio button, and choose the required group. This option is available only if you have existing groups.
Provide additional information 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.
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 following screenshot, 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. Click Open resource settings to view the resources and set up advanced settings.
If there is no text ... steps left box in the upper-right corner of the screen, this means that the resource is correctly created and everything is working. If there are still some unfinished steps, check out the following section.
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.
If a CNAME record is configured correctly, it will be shown in the UI:
If an error occurs, a corresponding message will appear.
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 Gcore support or retry the integration according to our instructions.
Was this article helpful?
Learn more about our next-gen CDN