Skip to content
Docs

Deploy your first CDN

This guide walks you through creating a CDN deployment and adding your first domain.

Prerequisites

  • An Edge Network account (sign up here)
  • A domain or subdomain you want to serve through the CDN
  • Access to your domain's DNS settings
  • An origin server where your content lives (S3, your web server, etc.)

Create a CDN deployment

A deployment is a container for your CDN domains. You might have one deployment per project or environment.

  1. Navigate to CDN in the sidebar.
  2. Click Deploy CDN.
  3. Enter a name for your deployment (e.g. "My Website" or "Production").
  4. Click Create Deployment.
Configuration options when creating a deployment
Configuration options when creating a deployment

Add a domain

Now add the domain you want to serve through the CDN.

  1. Click Add Domain.
  2. Enter your domain (e.g. cdn.yoursite.com).
  3. Enter your origin URL (e.g. https://origin.yoursite.com or an S3 bucket URL).
  4. Click Add Domain.
The Domains tab: one domain live with SSL, one waiting for its DNS record
The Domains tab: one domain live with SSL, one waiting for its DNS record

Note

The origin is where your actual content lives. This could be an S3 bucket, another CDN, your web server, or any URL that serves your static files.

Configure DNS

Point your domain to Edge CDN by adding this CNAME record at your DNS provider:

TypeName/HostValue/Target
CNAMEcdncdn.edge.network

Replace cdn with your subdomain. For a root domain, you may need to use your DNS provider's CNAME flattening feature or an ALIAS record.

  1. Log in to your DNS provider (Cloudflare, Route53, etc.).
  2. Add a CNAME record pointing to cdn.edge.network.
  3. Wait for DNS propagation (usually 1–5 minutes).
  4. Click Check DNS in the Edge console.

Wait for the SSL certificate

Once DNS is verified, we automatically issue a free SSL certificate for your domain using Let's Encrypt. The domain's SSL status changes from issuing to active.

Certificate issuance typically takes 30–60 seconds. The page updates automatically.

Tip

You're live! Your domain is now being served through Edge CDN with automatic SSL. Visit your domain to see it in action.

Host a static site

You can serve a static website directly from an Edge Storage bucket through the CDN. Upload your files to a storage bucket, create a CDN deployment with Storage Bucket as the origin type, and add your domain. When using a storage bucket origin, the CDN automatically serves index.html for directory paths. For example, visiting example.com/ serves index.html from the bucket root. The result is fully static hosting with global CDN caching, automatic SSL and zero egress fees.

  1. Create a storage bucket.
  2. Upload your site files (index.html, CSS, JS, images).
  3. Create a CDN deployment.
  4. Add a domain with origin type Storage Bucket.
  5. Your site is live.

The agent API can do all of this in one call with POST /agent/deploy/static-site. See the Storage documentation for more on buckets.

Test your CDN

Verify everything is working correctly:

Terminal
# Check the response headers
curl -I https://cdn.yoursite.com/path/to/file.jpg

# Look for these headers:
# x-cache: HIT (served from cache)
# Server: Edge CDN (confirmation that Edge served the request)

Next steps

Something unclear or out of date? Tell us, or read this page as Markdown.