CorefinityCorefinityDocs
Open the Control PanelControl Panel
Hosting defaults · 2 of 4

Connect Cloudflare

Give the Control Panel a token for your Cloudflare account so it can add DNS records, purge the cache and check SSL for your sites.

On this page

Before you start

  • You are a user of the organisation that owns the sites. An agency cannot connect Cloudflare for a client.
  • You can create API tokens in the Cloudflare account that holds your domains.
  • Sites whose DNS is elsewhere keep working: the Control Panel shows their records for you to add.

Connect your account

  1. Open Cloudflare

    Go to Organisation › Organisations, choose your organisation, then Cloudflare under Hosting.

  2. Create the token in Cloudflare

    Choose Connect Cloudflare, then Open Cloudflare API tokens. In Cloudflare choose Create Token, then Create Custom Token, and name it Corefinity panel.

  3. Give it four permissions

    Add the permissions listed in the dialog. Copy list copies them.

    Text
    Zone · Zone · Read
    Zone · DNS · Edit
    Zone · Cache Purge · Purge
    Zone · Zone Settings · Read + Edit
  4. Choose the zones

    Under Zone resources, choose Include, All zones from an account and your account. To limit the Control Panel to named domains, choose Specific zone instead.

  5. Paste the token

    In Cloudflare, choose Continue to summary, then Create Token, and copy the token. Paste it under Paste the token, choose Verify and connect, then Done.

The card now reads Connected and lists the account, the token's last four characters, its permissions and each zone the token can see.

What the connection does

UseThe Control Panel
Attaching a domain and URL changesPoints the domain at your site, proxied.
Email sendingAdds the SPF, DKIM, tracking and MX records.
Purge cacheClears Cloudflare's cache from each site's platform section.
SSL mode checkWarns when a zone is not on Full (strict).

Check your zones

Zones are matched to sites by domain. Choose Refresh zones after you add a zone in Cloudflare.

You seeDo this
Not mappedChoose Map a site, pick the site and choose Map.
Full or Flexible under SSL modeFollow the link to set Full (strict) in Cloudflare.
Token no longer works or Needs reconnectingChoose Reconnect and paste a new token.

Disconnect Cloudflare

  1. Disconnect and delete the token

    Choose Disconnect, then Disconnect Cloudflare. Delete the token in Cloudflare as well: the Control Panel cannot revoke it.

The Control Panel goes back to showing the records to add. Nothing in Cloudflare is changed.

Automate this

Connect Cloudflare

Checks a Cloudflare API token with Cloudflare and stores it encrypted for your company.

POST/api/corestack/company/cloudflare
curl -X POST https://manage.corefinity.com/api/corestack/company/cloudflare \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "example-cloudflare-api-token-0000000000000000"
  }'
Was this helpful?
Open in ClaudeOpen in ChatGPT