Connecting a site to Cloudflare in ISPmanager

Cloudflare sits between visitors and the site: it caches pages and filters attacks. The site stays on the hosting. The panel has an integration: a domain is connected to Cloudflare with a button in "Sites".

1. Create an API token in Cloudflare

  1. Sign up or log in at dash.cloudflare.com.
  2. "My Profile" → "API Tokens" → "Create Token".
  3. At the bottom of the templates: "Create Custom Token" → "Get started".
  4. Name the token and add the permissions listed below.
  5. "Continue to summary" → "Create Token". Copy the token: it is shown only once.
Cloudflare login
Cloudflare login
  • Account, Account Firewall Access Rules, Read
  • Zone, Cache Rules, Edit
  • Zone, Zone Settings, Read
  • Zone, Zone Settings, Edit
  • Zone, DNS, Read
  • Zone, DNS, Edit
  • Zone, Zone, Edit
  • Zone, Cache Purge, Purge
  • Zone, Firewall Services, Read
  • Zone, Firewall Services, Edit

In "Zone Resources" choose "Include" → "All zones from an account", and your account in "Account Resources". With a single-zone token ("Specific zone") the panel cannot connect the domain: it creates the zone in Cloudflare, and that right is granted only per account. The module log shows "Requires permission com.cloudflare.api.account.zone.create".

2. Connect the token in the panel

  1. Open "Sites".
  2. On the top toolbar click "User" with the Cloudflare cloud icon.
  3. Paste the token into "API Token".
  4. Click "Create".
The Cloudflare "User" button in Sites
The Cloudflare "User" button in Sites
Connecting the API token
Connecting the API token
Token pasted
Token pasted

3. Connect the domain

After the token is connected, a "Cloudflare" button appears in "Sites". It opens the list of your sites.

The "Cloudflare" button in Sites
The "Cloudflare" button in Sites
  1. Tick the site and click "Add".
  2. "Connection type": "Full". Click "Save".
Site selected, the "Add" button
Site selected, the "Add" button
Connection type "Full"
Connection type "Full"

The panel creates a zone in Cloudflare and copies the site DNS records there. "Free" appears in the "Subscription plan" column.

If the domain was already added to Cloudflare manually, connecting from the panel fails with "already exists" in the log. Delete the zone in Cloudflare or manage it there.

4. Change the NS

Cloudflare gives two DNS servers like name.ns.cloudflare.com. Set them at your domain registrar. Until the NS change, the zone waits for activation and the sections below are unavailable. Usually 10–30 minutes, sometimes up to a day.

Cloudflare DNS servers
Cloudflare DNS servers

The status updates by itself. To check at once: tick the site → "More" → "Update".

5. Managing in the panel

When a check mark appears in "Status", tick the site. The sections become available on the top toolbar.

Sections for a connected site
Sections for a connected site
SectionUse
DNS recordszone records in Cloudflare: A, MX, TXT and others
Page rulescaching and redirects for specific addresses
Firewallblocking and allowing by IP, country, network
Settingssecurity level, SSL, HTTPS, optimization
Clear cachepurge the Cloudflare cache after site changes
Zone DNS records
Zone DNS records
Page rules
Page rules
Firewall
Firewall

Proxy must be off for the mail and MX records, otherwise email stops working.

6. Settings and SSL

"Settings" opens the zone settings.

The "Settings" button
The "Settings" button
Zone settings
Zone settings
SSLWhen to choose
Existinga valid certificate such as Let's Encrypt is installed on the hosting. Recommended
Self-signedCloudflare encrypts the link to the hosting but does not verify the certificate
Flexibleno encryption between Cloudflare and the hosting. A redirect loop is possible if the site forces HTTPS

After the NS change, DNS records are edited in the module "DNS records" section. Records in the panel "DNS management" no longer apply.

Questions and answers
No, if proxy is off for the mail and MX records (DNS only mode).
Full (strict). Issue the certificate on the hosting first.
The token is scoped to one zone. Connecting from the panel needs an account-level token: Zone Resources — All zones from an account.
"Sites" → the "User" button with the cloud icon. Paste your Cloudflare API token.
In Cloudflare. Records in the hosting panel stop applying after the NS change.