Skip to content

Cloudflare protection

Putting a site behind Cloudflare.

Operations

OperationRequest
Get a site's Cloudflare protection GET /v1/sites/{siteId}/protection
Turn a site's Cloudflare protection on or off PUT /v1/sites/{siteId}/protection
List requests Cloudflare stopped on a site GET /v1/sites/{siteId}/protection/events

The SiteProtection object

A site's Cloudflare protection: its visitors reach it through Cloudflare first, which stops DDoS attacks, applies its managed rules and browser check, and keeps out the addresses on Rabbitflare's blocklist. The site's own firewall still checks everything that gets through. No Cloudflare account of your own is needed.

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

The SiteProtection object
{
  "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": []
}

The ProtectionEvent object

A request Cloudflare blocked or challenged on one of the site's domains.

FieldType and description
id

string

The event's id in this list: the request's Ray ID. When one request was stopped more than once, each of its events adds what happened to it, like 8e3f2a1b4c5d6e7f-block-managed-rules.

occurredAt

string An ISO 8601 time, in UTC

When the request came.

action

string

What Cloudflare did: block (refused it), or a challenge the visitor had to pass: managed_challenge, challenge or jschallenge.

Known values: blockchallengemanaged_challengejschallenge More can appear.

hostname

string

The domain the request was for.

method

string

The request's HTTP method, like GET or POST.

path

string

The page asked for (up to 300 characters).

ip

string

The IP address the request came from.

country

string or null

The country the request came from, as a two-letter code like US. Null when not known.

reason

string

What stopped it, in words: for example Managed rules, Blocklist, Browser check, DDoS protection or Rate limit; Cloudflare when it was another of Cloudflare's protections.

userAgent

string or null

The browser or tool the request said it came from (up to 300 characters). Null when it sent none.

rayId

string or null

Cloudflare's Ray ID of the request: the code a stopped visitor sees on Cloudflare's page. Null when not known.

Example

The ProtectionEvent object
{
  "id": "8e3f2a1b4c5d6e7f",
  "occurredAt": "2026-11-18T10:44:09.000Z",
  "action": "managed_challenge",
  "hostname": "shop.example.com",
  "method": "POST",
  "path": "/wp-login.php",
  "ip": "198.51.100.77",
  "country": "US",
  "reason": "Managed rules",
  "userAgent": "python-requests/2.32.3",
  "rayId": "8e3f2a1b4c5d6e7f"
}

Popular

API docs