Skip to content

Get a site's Cloudflare protection

GET /v1/sites/{siteId}/protection

Returns the site's Cloudflare protection: whether it's on, the site's name at Cloudflare (edge), and each of its domains with where it stands and the DNS record that sends it through Cloudflare.

Who changes a domain's DNS depends on where it is (dnsBy): Rabbitflare switches domains bought from Rabbitflare, and domains whose DNS is in a Cloudflare account you connected to Rabbitflare; for any other, set its record at its DNS company once its status is ready. Poll it to follow a change: what Rabbitflare knows about each domain's DNS is brought up to date in the background.

Scopes

The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).

sites:read
View sites. See sites and their domains, CDN, firewall, malware protection, backups, staging, resources, SMTP and Media Offload. SMTP includes who each site's recent emails went to, their subjects, and the team's sign-in addresses.

Path parameters

FieldType and description
siteId Required

string

The site's id.

Example request

curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/protection" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns the SiteProtection object in data.

The SiteProtection object's fields 22 fields
FieldType and description
on

boolean

Whether Cloudflare protection is switched on for the site.

status

string

off, applying (being turned on or off: adding the site's domains to Cloudflare, or taking them out, which can take up to 15 minutes), active, or failed (see error; switch it on or off again to retry).

Known values: offapplyingactivefailed More can appear.

error

string or null

Why turning it on or off failed (with status: "failed"). Null otherwise.

edge

string or null

The site's own name at Cloudflare, like shop-x7k2p.rabbitflare.net: each domain goes through Cloudflare once its DNS points here. Null when the site can't be protected (contact support).

needs

string or null

What the site needs before protection can go on (a domain of your own as its primary domain). Null when nothing, and while it's on.

domains

array of objects

The site's own domains, while protection is on (its built-in address isn't listed). Empty while it's off.

domainId

string

The domain's id, as the site's list of domains gives it.

hostname

string

The domain, like www.example.com.

status

string

protected: its visitors come through Cloudflare. switching: Rabbitflare is switching its DNS (dnsBy isn't you); nothing to do. ready: its certificate is ready: set record at its DNS company now. preparing: Cloudflare is checking it and making its certificate (a few minutes); nothing to change yet. action: something comes first, detail says what (such as turning off your own Cloudflare proxy for it). redirects: a root domain that can't point at a name: its visitors are sent on to the primary domain; nothing to do. error: Cloudflare refused it, detail says why.

Known values: protectedswitchingreadypreparingactionredirectserror More can appear.

detail

string or null

What's happening with it, or why it waits or was refused, in a sentence. Null when it's protected.

record

object or null

The DNS record that sends the domain through Cloudflare. At Cloudflare, set it to DNS only (grey cloud), and remove other A, AAAA or CNAME records of the same name (keep MX and TXT records: they're for email). Null for a root domain whose DNS company can't point it at a name.

Show its 3 fields
FieldType and description
type

string

CNAME, or for a root domain the DNS company's ALIAS or ANAME record.

Known values: CNAMEALIASANAME More can appear.

name

string

The record's name: the domain itself.

value

string

What it points at: the site's name at Cloudflare (edge).

dnsBy

string

Who changes its DNS: rabbitflare (it was bought from Rabbitflare), your_cloudflare (its DNS is in a Cloudflare account you connected to Rabbitflare: Rabbitflare changes it there), or you (at its DNS company, as record says).

Known values: rabbitflareyour_cloudflareyou More can appear.

dnsCompany

object or null

The DNS company its nameservers belong to. Null when not known yet or not recognised, and for domains bought from Rabbitflare.

Show its 3 fields
FieldType and description
id

string

The company's id, like cloudflare, godaddy or namecheap.

name

string

The company's name, like Cloudflare, GoDaddy or Namecheap.

root

string

How a root domain (example.com, no www) can point at a name there: cname (a CNAME works), alias or aname (its own record type for it), none (it can't: make www the primary domain, and the root keeps its A record), or unknown.

Known values: cnamealiasanamenoneunknown More can appear.

locked

boolean

Whether the site's server already refuses visitors who skip Cloudflare on its protected domains (an hour after a domain starts coming through Cloudflare).

stillPointed

array of strings

While it's off: domains whose DNS still points at the site's name at Cloudflare. They keep working (that name now leads straight to the server); point them back at the server when you like.

connectFor

array of strings

While it's on: domains whose DNS is in a Cloudflare account that isn't connected to Rabbitflare. Connect that account in the panel and Rabbitflare switches them for you; otherwise set their record yourself.

Example response

200 OK
{
  "data": {
    "on": true,
    "status": "active",
    "error": null,
    "edge": "shop-x7k2p.rabbitflare.net",
    "needs": null,
    "domains": [
      {
        "domainId": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
        "hostname": "shop.example.com",
        "status": "ready",
        "detail": "Its certificate is ready. Change the record now.",
        "record": {
          "type": "CNAME",
          "name": "shop.example.com",
          "value": "shop-x7k2p.rabbitflare.net"
        },
        "dnsBy": "you",
        "dnsCompany": {
          "id": "godaddy",
          "name": "GoDaddy",
          "root": "none"
        }
      }
    ],
    "locked": false,
    "stillPointed": [],
    "connectFor": []
  }
}

Errors

The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).

Status and codeWhen, and what to do
403 feature_unavailable

This product isn't open to the account.

Contact support if you'd like it opened.

404 not_found

The resource doesn't exist, or isn't this account's.

Check the id. Ids of other accounts' resources answer the same way.

Rate limit

Read requests: 120 a minute per token, 240 per account. More in Rate limits.

Added on .

Deprecated since November 28, 2026; it stops working on November 30, 2027. Cloudflare protection was removed from Rabbitflare on 28 November 2026: this operation answers `403 feature_unavailable` for every site, and goes in v2.

Popular

API docs