Skip to main content
This guide takes a file on your origin and serves it through Cloud CDN. Verify delivery on the assigned Aptranet hostname before connecting a production hostname.

Before you begin

  • Select a project with an active Cloud CDN service.
  • Have permission to create origin groups and distributions.
  • Have a publicly reachable HTTP or HTTPS origin.
  • Choose a public test file, such as /assets/app.css, whose contents you can recognize.
The example origin is origin.example.com. Replace it and the test path with your own values. Keep private or authenticated content out of this first test.
1

Check the origin

Request the file directly and confirm its status, contents, and cache headers.
Resolve origin errors before continuing. For HTTPS, the origin must present a valid certificate for the hostname used to connect.
2

Create an origin group

Open Cloud CDN → Origin groups → Create origin group. Name it website-origins and add one enabled origin.Enter origin.example.com without a scheme or path. Add a port only if the origin uses a nonstandard port. Keep this first origin as primary rather than backup-only.If the origin routes requests by hostname, check its Host header requirements.
3

Create a distribution

Open Cloud CDN → Distributions → Create distribution. Name it website-staging, select the origin group, and choose the origin connection protocol.Choose https if your origin supports HTTPS. The origin protocol controls the edge-to-origin connection; it is separate from visitor-facing HTTPS.For automation, see the verified creation examples in origin groups and distributions.
4

Verify the assigned hostname

Refresh the distribution list until the distribution is active. Copy its assigned hostname; do not construct a hostname from its numeric ID.Request the same test path through that hostname:
Use HTTPS when it is enabled and ready for the assigned hostname. If visitor HTTPS is not ready, test public content over HTTP while you configure TLS.Confirm the expected status and file contents. A successful request to / alone does not verify that your application’s asset paths work.
5

Review delivery settings

Open the distribution’s Cache, Origin, and TLS pages. Confirm the origin protocol and Host header, then choose a cache policy appropriate for the content.Save each changed configuration and test the file again. Check a missing path too, so an error page is not mistaken for a working asset.
6

Connect your hostname

Follow domains and TLS to add a custom hostname, create its DNS record, and verify its certificate. That guide also explains how to test routing before changing public DNS.Keep the previous delivery path available during a production cutover.

Verify the result

You have a working distribution when its status is active and the assigned hostname returns the expected file. After connecting a custom hostname, verify the same path over HTTPS without bypassing certificate validation. Request the file again and review request logs and analytics as data becomes available. Do not assume every response should be a cache hit: freshness, request headers, query strings, and your cache policy affect eligibility.

If the file does not load