Creating a CDN deployment#
A CDN deployment is a container for one or more domains. When you create one, Edge provisions cache space across 988 global edge locations for your content.
In the console, navigate to CDN and click Create Deployment. Give it a name that identifies your project (e.g. “marketing-site” or “api-cache”).
Adding a domain#
Each deployment can have multiple domains. Add your domain and specify the origin, which is the server where your content lives. Edge fetches from your origin on cache miss and serves from cache on hit.
You’ll need to create a CNAME record pointing your domain to cdn.edge.network. Once DNS propagates, Edge automatically provisions a free SSL certificate via Let’s Encrypt.
Configuring cache rules#
By default, Edge caches everything for 1 year. You can customise this per path:
- Static assets (images, CSS, JS): cache for 1 year, as they rarely change.
- HTML pages: cache for 1 hour or less if content updates frequently.
- API responses: short TTL (minutes) or bypass the cache entirely.
Configure these in the deployment’s Configuration tab under Cache Rules.
Image optimisation#
Edge CDN includes automatic image optimisation. When enabled, images are converted to WebP or AVIF based on the visitor’s browser support, and resized on-the-fly via URL parameters. This is enabled by default on new deployments.
Purging the cache#
When you update content, you can purge individual URLs or the entire cache. Purges propagate globally within seconds.
# Purge a specific URL
edge cdn purge <deployment-id> --url https://cdn.example.com/style.css
# Purge everything
edge cdn purge <deployment-id>Keep learning
Best practices3 min read
How to set up a CDN
Putting a CDN in front of your site takes about five minutes: create a deployment, point it at your origin, and update one DNS record. Here's the full walkthrough.
Best practices3 min read
Caching strategies
Get the most from Edge CDN: how caching flows from origin to edge to user, how to configure cache rules, and how to optimise hit rates.
Tutorials3 min read
Setting up a multi-region CDN
Edge CDN is global by default, across 988 locations. Unlike AWS, you don't configure regions: the network routes requests to the nearest node automatically.