While our free Cloudflare integration will work great for most customers, if you want a little more fine-grained control or need to implement something at Cloudflare not offered by our integration, you can switch your site to use your own Cloudflare account while still hosting the site here at Kinsta.
- This tutorial assumes that you’ve already added, verified, and pointed your site’s domain to Kinsta.
- These instructions are for switching your existing domain to use your own Cloudflare account, not Kinsta’s Cloudflare integration. If you want to enable our Cloudflare integration for a domain, check out this article: How to Enable Kinsta’s Cloudflare Integration for an Existing Domain.
- In order to use your own Cloudflare account, you’ll need to point your domain’s name servers to Cloudflare. This means if you’re currently using Kinsta DNS, you’ll no longer be able to use that, and your domain’s DNS will be managed at Cloudflare.
How to Install and Configure Cloudflare
If you don’t already have a Cloudflare account, visit their signup page to get started.
Add your domain to your Cloudflare account. When prompted, select the desired Cloudflare plan for your domain (no minimum plan is required for this to work with Kinsta).
Cloudflare will attempt to pull in DNS records for your domain. Double-check these to make sure all of your domain’s DNS records were correctly copied over.
- Remove all existing A records in Cloudflare DNS
- Add a CNAME record for the root/apex domain, pointing to hosting.kinsta.cloud.
- If you already have a CNAME for www, point that to either the root/apex domain (@) or to hosting.kinsta.cloud. If you do not have a CNAME for www, create one pointing to either the root/apex domain (@) or to hosting.kinsta.cloud.
- Be sure the orange cloud (proxy) is enabled for both CNAME records and click the Continue button.
At your domain registrar, update your domain’s name servers to point to the ones provided in your Cloudflare account.
During the propagation period, your site should remain up without any downtime. The domain’s status in MyKinsta may change to “We’re checking to see if your domain’s DNS records point to Kinsta.” This is normal and should resolve itself once propagation is complete.
Cloudflare WordPress Plugin
The Cloudflare plugin isn’t required but is recommended. Features include:
- Fix for WordPress comments appearing from the same IP address
- Automatic cache purging
- Header rewrite to prevent a redirect loop when Cloudflare’s Universal SSL is enabled
- Ability to change settings on Cloudflare account from within the plugin itself (cache purge, security level, image optimization, etc.)
- View analytics such as total visitors, bandwidth saved, and threats blocked
- Support for HTTP2/Server Push
After installing the plugin, you’ll need to enter the email address you use with your Cloudflare account and your API key. You can view your API key on the API Tokens page in your Cloudflare profile. Copy the Global API Key, add it to the plugin settings, and click on Save API Credentials.
Troubleshooting Common Cloudflare Issues
When adding an extra layer of complexity like a CDN and/or proxy, there may be times when something doesn’t work as expected. Below are some of the most common issues that may arise when using your own Cloudflare account and solutions for those issues.
Changes Aren’t Showing up on Your Site
Using your own Cloudflare account means your site will have an additional layer of caching that may need to be cleared. If you’re having trouble seeing changes on your site or a plugin isn’t behaving as expected after installing or reinstalling, be sure you clear cache at all layers, including:
- Plugins (if applicable)
- Themes (if applicable)
- Site/server cache at Kinsta (from either MyKinsta or the Kinsta MU plugin)
- Cache at Cloudflare either in the Cloudflare dashboard or the Cloudflare plugin.
- Browser cache
If you see either of the following errors, this is usually caused by having Flexible SSL enabled in Cloudflare settings:
- “ERR_TOO_MANY_REDIRECTS” in Chrome or
- “The page isn’t redirecting properly” (Firefox).
To resolve this issue, make sure your domain’s SSL/TLS encryption mode (SSL/TLS > Overview) in Cloudflare is set to Full.
Advanced Settings and Compatibility
There are a few more important things to keep in mind when your site is using your own Cloudflare account with Kinsta’s Cloudflare integration. If you have any questions about specific Cloudflare settings not answered below, check out our more in-depth article on Cloudflare Settings and How They Work With Kinsta’s Cloudflare Integration or open a new chat with our Support team, and we’ll be happy to check into those for you.
Can be enabled in Cloudflare and Kinsta CDN, but there’s no benefit to enabling it in both.
Cloudflare Apps can be used and will work with Kinsta’s Cloudflare integration. App settings will be managed in your Cloudflare dashboard (not in MyKinsta).
Cloudflare Page Rules
Page Rules are applied from your Cloudflare account first. This allows you to set redirects at the edge. Note: Certain cache-related page Rules may behave unexpectedly. If you run into any issues with those, open a new chat with our Support team to help you troubleshoot any cache-related conflicts.
Cloudflare Workers are compatible, as long as the worker script doesn’t transform the site’s URL in such a way that it prevents it from loading the domain(s) added to the site in MyKinsta.
Brotli is enabled with Kinsta’s Cloudflare integration and cannot be turned off. Even if you disable this in your Cloudflare account, Kinsta’s Brotli setting will still be turned on and will keep it enabled for the site.
Settings configured in your Cloudflare account are applied first. This means if an IP address is blocked by our firewall settings, your settings will not be able to override that. If you or a site visitor experience a blocked request that isn’t shown in your firewall logs, open a new chat with our Support team so they can check for any blocks in our firewall.
Settings from your Cloudflare account are not applied.
This is turned off by default in Kinsta’s Cloudflare integration but can be enabled in your Cloudflare account and will work.
Cloudflare’s Waiting Room feature should work without any additional configuration.
Settings and Features Not Compatible With Kinsta’s Cloudflare Integration
The following settings are either already enabled or not compatible with Kinsta’s Cloudflare integration, so they should not be turned on for newly added sites in your Cloudflare account:
- Argo tunnel
- Polish + Webp