Home Articles Getting started How To Connect Servebolt Optimizer to Cloudflare

How To Connect Servebolt Optimizer to Cloudflare

As of version 2.0, our Servebolt Optimizer plugin allows you to directly connect your site to Cloudflare via their API.

Connecting your site to your Cloudflare account can be done in two ways. Creating a Cloudflare API token or using the Cloudflare API key.

Create Cloudflare API token

A Cloudflare API token is the most preferred way to connecting your site to your Cloudflare account. A token allows for much more granular access control. You can learn more about how to create a Cloudflare API token here.

Use Cloudflare API key

The other option is using your general Cloudflare API key to connect your site to your Cloudflare account. The drawback of using the API key is that it connects your entire account – with every zone (domain) in there. You can find your Cloudflare API key by following these instructions.

Connect Cloudflare to your site via the API token

After you’ve created the API token, you’ll then need to use that token – which looks like a long string of numbers and text – to connect your site. Navigate to the Servebolt Optimizer plugin menu called Cloudflare Cache in the Dashboard of your site. On that page you’ll be asked to make a choice of what Authentication type to use. Select API token and you’ll be prompted to enter the API token. 

Additionally, you’ll need to enter the Cloudflare Zone ID of your domain. You can find this on the overview page of your domain in your Cloudflare account. In the bottom of your right hand sidebar.

Connect Cloudflare to your site via the API key

After you’ve copied the API key from you Cloudflare profile account, you’ll then need to use that key – which looks like a long string of numbers and text – to connect your site. Navigate to the Servebolt Optimizer plugin menu called Cloudflare Cache in the Dashboard of your site and select API key for Authentication type.

Once you’ve selected the API key, you’ll be prompted to enter the email address connected to your Cloudflare account and the API key you just copied. 

After you’ve entered both, you’ll be able to select which domain/Zone ID to connect to. 

Did this help you?