Skip to main content
Google Cloud Storage can store public assets while Gcore CDN caches and delivers them through a custom domain. This setup uses the public path-style endpoint, so origin requests follow storage.googleapis.com/bucket-name/object-name. Access to a Google Cloud project with permission to create buckets and edit bucket IAM policies, an active CDN subscription, and control of the DNS zone for the CDN domain are required.
1

Create a Google Cloud Storage bucket

In the Google Cloud console, navigate to Cloud Storage > Buckets and click Create. Configure the bucket:
  1. Enter a globally unique bucket name.
  2. Select the location and storage class for the content.
  3. Select uniform bucket-level access.
  4. Configure public access prevention so it is not enforced for this bucket.
  5. Configure the required data protection settings and click Create.
If an organization policy enforces public access prevention, use a different project or ask a Google Cloud administrator to allow public access for the project.
2

Upload the content

Open the bucket, click Upload files or Upload folder, and upload the assets to deliver through the CDN.
3

Allow public object access

On the bucket page, open Permissions and click Grant access:
  1. In New principals, enter allUsers.
  2. In Select a role, select Storage Object Viewer.
  3. Click Save, then click Allow public access.
This IAM binding makes every object in the bucket anonymously readable. Store only content intended for public delivery in the bucket.
4

Verify the Google Cloud Storage URL

Open a public object through the path-style endpoint:
Replace my-bucket-1/images/image.png with the bucket name and object path. The request must return the object without requiring Google authentication.
5

Create the CDN resource

In the Gcore Customer Portal, click Create CDN resource and configure the resource:
  1. In Add domain, enter the CDN domain — cdn.example.com.
  2. Select Do not delegate to keep DNS at the current provider.
  3. Under Origin, select Specify content origin and URL.
  4. In Origin source, enter storage.googleapis.com.
  5. Keep Use default port enabled.
  6. In Host header override, enter storage.googleapis.com.
  7. Under SSL, enable Enable HTTPS.
  8. Select Get free Let’s Encrypt certificate or Custom SSL certificate. A Let’s Encrypt certificate is issued after the custom domain CNAME is in place.
  9. Click Create.
URL origin configured with storage.googleapis.com as the source and host header
After creation, open the resource settings. Under General > Origin pull protocol, select HTTPS, then click Save changes.
6

Configure DNS

At the DNS provider, create a CNAME record for cdn.example.com that points to the generated *.gcdn.co hostname shown by the Customer Portal.Follow the custom domain setup to verify the DNS record and resource activation.
7

Verify the CDN object path

Keep the bucket name in the CDN URL when Rewrite is not configured:
The path after the CDN domain is forwarded to storage.googleapis.com, so it must match the bucket name and object path.
8

(Optional) Hide the bucket name

To expose /images/image.png instead of /my-bucket-1/images/image.png, open the resource settings and navigate to Content. Add the Rewrite option and enter:
Replace my-bucket-1 with the bucket name. Click Save changes. The public URL becomes https://cdn.example.com/images/image.png, while the origin request uses /my-bucket-1/images/image.png.
9

Update asset URLs and verify delivery

Update the website or application to use the CDN URLs. In the browser developer tools:
  1. Open the Network panel.
  2. Reload the page.
  3. Select an asset request.
  4. Confirm that the request uses cdn.example.com and returns a successful response.
If the request returns 403, verify the bucket IAM policy and public access prevention. For a 404 response, compare the CDN request path with the bucket name and object path.