Create a CDN Endpoint
Worktree Cloud's CDN can expand your static sites with caching, automatic TLS certificates, and mapping custom domains. CDN Endpoints are free to create, and only charge based on request volume and bandwidth consumed.
In addition, a CDN Endpoint can redirect all requests to a new URL instead of serving a static site. This can be useful to serve requests for an apex domain to redirect to a subdomain (eg., example.com
-> www.example.com
).
Prerequisites
- A Worktree account
- A Worktree Cloud Organization
- Access to your domain's DNS settings
Step 1: Create a CDN Endpoint
- Open the Worktree Cloud Console and navigate to CDN, and select Add Endpoint.
- Provide the hostname this endpoint will serve, for example,
www.example.com
. - Choose the origin type: "Site" will serve content from a static site, and "Redirect" will redirect all requests to the provided URL.
- Based on the origin type, either select a Site from the list, or provide the redirect target URL.
Step 2. Validate Domain Ownership
Before we can enable your CDN endpoint, you have to validate that you control
the domain. To validate, create the _acme-challenge
CNAME record pointing to
Worktree Cloud.
The target hostname for the CNAME is given to you in the instructions in the Worktree Cloud Console, and is unique to every endpoint.
Type: TXT
Name: _acme-challenge.www
Value: [provided in the instructions in the Cloud Console]
TTL: 3600
Once validated, a TLS certificate will be issued automatically. Once issued, the Endpoint will be ready to serve requests within 120 seconds.
Step 3: Point your domain to Worktree Cloud
Once your endpoint has been validated and has issued the TLS certificate, it's ready to start serving requests for your domain. Update your domain's DNS to point to the CDN Endpoint's hostname.
For example:
Type: CNAME
Name: www
Value: xxxyyyzzz.cdn.qc-south-1.w6e.ca.
TTL: 3600
These hostnames are unique to each endpoint and are shown on the CDN Endpoint details page. Note that these hostnames are just for DNS -- they can't be used for HTTP requests directly.
Using an apex domain
If you want to use an "apex" domain (i.e., a domain without a subdomain), you cannot use a CNAME record.
We recommend choosing a DNS provider that supports ALIAS
or ANAME
record
types so that you can continue to reference the Worktree Site subdomain.
If you must, you may configure A
and AAAA
records directly, however these
may change from time-to-time, so ensure you check back to these docs regularly
to avoid interruptions.
A
Record:51.222.19.171
AAAA
Record:2607:5300:401:3200::c
Common Issues
Validation or Certificate Issuance fails
- Wait for DNS propogation; some DNS providers can take up to a few hours to roll out changes.
- Check that the
_acme-challenge
DNS record is present and correctly configured - Ensure, if you have a CAA record, it allows Let's Encrypt (
0 issue "letsencrypt.org"
)