Skip to content

CDN

The included CDN for a site's static files. For the same in the control panel, see Turn on the CDN.

Operations

OperationRequest
Get a site's CDN GET /v1/sites/{siteId}/cdn
Turn on a site's CDN POST /v1/sites/{siteId}/cdn/actions/enable
Turn off a site's CDN POST /v1/sites/{siteId}/cdn/actions/disable
Clear files from a site's CDN POST /v1/sites/{siteId}/cdn/actions/purge
Choose what a site's CDN serves PUT /v1/sites/{siteId}/cdn/settings
Add a custom hostname to a site's CDN PUT /v1/sites/{siteId}/cdn/hostname
Remove a site's custom CDN hostname DELETE /v1/sites/{siteId}/cdn/hostname
Check a custom CDN hostname's DNS now POST /v1/sites/{siteId}/cdn/hostname/actions/check

The SiteCdn object

A site's CDN, included with Rabbitflare's cloud servers: its images, CSS, JavaScript, fonts and other static files served from 600+ locations worldwide, so visitors get them from nearby. Pages, logins, carts and forms still come from the site's server.

FieldType and description
status

string

off: the site serves every file itself. enabling: being set up (see stage; usually 3 to 10 minutes). active: the site's files are served from the CDN. failed: setting it up stopped (see lastError); switching it on again carries on where it stopped.

Known values: offenablingactivefailed More can appear.

stage

string or null

While enabling, or where a failed setup stopped: creating (setting up the site's CDN), deploying (spreading it to every location), verifying (checking it serves the site's files), then installing (switching the site's pages to it). Null otherwise.

Known values: creatingdeployingverifyinginstalling More can appear.

blockedReason

string or null

Why the CDN can't be switched on (or changed) for this site right now, in a sentence: the site is a staging copy, is still installing, or is on your own server or a trial server, its server is off, or its built-in address has no SSL certificate yet. Null when nothing stands in the way.

domain

string or null

The CDN's own address for the site's files, which the site's pages use (until a custom hostname is active). Null while the CDN is off or being set up.

startedAt

string or null An ISO 8601 time, in UTC

When the setup started, while enabling or failed. Null otherwise.

enabledAt

string or null An ISO 8601 time, in UTC

When the CDN came on, while it's active. Null otherwise.

lastError

string or null

Why the setup failed (with status: "failed"). Null otherwise.

purging

boolean

Whether files are being cleared from the CDN now (it takes a minute or two).

purgedAt

string or null An ISO 8601 time, in UTC

When files were last cleared from the CDN. Null when they never were.

usage

object or null

What the CDN served for the site over the last days days. Null while it's off, or when the figures can't be read just now.

days

integer

The number of days the figures cover, up to now.

requests

integer

Requests the CDN served for the site.

bytes

integer

Bytes the CDN served for the site.

deliveryOptions

boolean

Whether the delivery options are open to the account: choosing the kinds of files the CDN serves and paths it leaves on the server (PUT /sites/{siteId}/cdn/settings), a custom hostname, and clearing particular files. When false, those answer 403 feature_unavailable; switching the CDN on and off and clearing everything work either way.

settings

object

What the CDN serves. It applies whenever the CDN is on; a site that never chose serves every kind and keeps no paths.

types

array of strings

The kinds of files the CDN serves, from the site's /wp-content and /wp-includes folders: images (Images: JPG, PNG, GIF, WebP, AVIF, SVG, ICO), css (CSS: Stylesheets), js (JavaScript: Scripts), fonts (Fonts: WOFF2, WOFF, TTF, OTF, EOT), media (Video and audio: MP4, WebM, MP3, M4A, WAV, OGG), documents (PDFs: PDF documents).

Known values: imagescssjsfontsmediadocuments More can appear.

exclude

array of strings

Paths kept on the server: files whose address starts with one of them are never served from the CDN.

customHostname

object or null

The site's custom CDN hostname, while the CDN is on. Null when it has none, or when the delivery options aren't open to the account.

hostname

string

The hostname the site's files are served from, like cdn.example.com.

status

string

validating: waiting for its DNS records (add both). attaching: adding it and its certificate to the CDN. deploying: spreading it to every CDN location (usually 3 to 10 minutes). checking: checking it serves the site's files (its routing record must point at the CDN). installing: switching the site's pages to it. active: the site's files are served from it. removing: being removed (the site already uses the CDN's own address again). failed: see error.

Known values: validatingattachingdeployingcheckinginstallingactiveremovingfailed More can appear.

records

array of objects

The DNS records to add for it, while it's being set up. The validation record appears a few seconds after the hostname is added; once the hostname is active only the routing record is listed (keep it).

Show its 4 fields
FieldType and description
type

string

The record's type: CNAME.

Known values: CNAME More can appear.

name

string

The record's name (where to add it), in full.

value

string

What the record points at.

purpose

string

validation: proves the hostname is yours, for its SSL certificate. routing: sends the hostname's visitors to the CDN.

Known values: validationrouting More can appear.

dnsZone

string or null

The domain registered with Rabbitflare, and using Rabbitflare DNS, that the hostname is on: add the records in the control panel, on the domain's DNS page. Null when its DNS is elsewhere: add the records there.

error

string or null

Why setting it up failed (with status: "failed"). Remove it and add it again to start over. Null otherwise.

addedAt

string An ISO 8601 time, in UTC

When the hostname was added.

Example

The SiteCdn object
{
  "status": "active",
  "stage": null,
  "blockedReason": null,
  "domain": "d1a2b3c4e5f6g7.cdn.example.net",
  "startedAt": null,
  "enabledAt": "2026-11-18T09:42:10.000Z",
  "lastError": null,
  "purging": false,
  "purgedAt": "2026-11-18T11:05:33.000Z",
  "usage": {
    "days": 7,
    "requests": 184220,
    "bytes": 9310442118
  },
  "deliveryOptions": true,
  "settings": {
    "types": [
      "images",
      "css",
      "js",
      "fonts",
      "media",
      "documents"
    ],
    "exclude": []
  },
  "customHostname": null
}

Popular

API docs