Custom domains and certificates
A custom domain lets you serve a site from your own hostname instead of the CDN hostname. CDNify verifies that you control the domain before it is used.
Add a domain
Add the hostname from the Domains tab of the site or with the API. The domain starts in pending_validation and comes with the DNS records that prove ownership.
Create the routing CNAME record that points the hostname to the CDN hostname of the site, and the ownership records listed with the domain.
cdn.example.com. 3600 IN CNAME example01.a.cdnify.io.curl -X POST 'https://api.cdnify.lat/api/v2/sites/site_0a1b2c3/custom-domains' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"hostname":"cdn.example.com"}'Verify ownership
Once the records are in place, check the domain. When the records are found, the domain becomes active. If they are not found yet, wait for DNS propagation and check again.
An unverified claim expires after a while (domain_claim_expired), and a hostname that another organization verifies first is no longer yours to verify (domain_claim_invalidated). In both cases, add the domain again.
curl -X POST 'https://api.cdnify.lat/api/v2/sites/site_0a1b2c3/custom-domains/domain_example/verification' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"TLS modes
Each custom domain has a TLS mode:
- Shared (
shared): the domain has no certificate of its own. - Managed (
managed): a certificate that CDNify obtains and renews for the domain. - Custom (
custom): a certificate you upload.
Managed certificates
Request a managed certificate for one or more verified custom domains. CDNify obtains it through ACME, with HTTP validation when the domain already points to CDNify, or with a DNS record, including a delegated record that points to CDNify.
Managed certificates renew automatically before they expire. You can also renew one on demand; the new certificate replaces the current one when it is issued.
Upload your own certificate
Paste or upload the certificate and its private key in PEM format: your certificate first, followed by the intermediate certificates. The key must not be protected by a passphrase.
The private key is encrypted at rest and is never shown again. To rotate an uploaded certificate, upload the new one.