How to configure the Cloudflare CDN (Content Delivery Network)
This article describes how to use cPanel to configure the Cloudflare CDN (Content Delivery Network) for your web site.
- This article assumes that you have already activated Cloudflare for your account and are ready to configure it. If you have not activated Cloudflare yet, please see this article.
- The Cloudflare plugin may be used to configure your site using CNAME or Full DNS. This article describes configuration using the CNAME method which provides many Cloudflare features while retaining the ease of managing DNS with cPanel.
Configuring Cloudflare
After you activate Cloudflare, you are ready to configure it for your web site. This process involves enabling Cloudflare for certain domains on your web site.
Cloudflare only accelerates and protects domains that have CNAME (canonical name) records. However, the root domain (example.com) uses an A record and cannot be routed directly through the Cloudflare network. Therefore, to make sure Cloudflare handles all traffic to your site, you should use an .htaccess file to forward root domain requests to the www domain.
If you do not forward traffic from the root domain, traffic to www.example.com will be accelerated and protected by Cloudflare (and shown in site statistics), but traffic to example.com will not.
The following sections describe how to use the cPanel plugin to configure Cloudflare for your domain.
Enabling Cloudflare
If you activated your Cloudflare account using cPanel, use the integrated Cloudflare plugin to configure your site. To do this, follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see
this article.
- In the SOFTWARE section of the cPanel home screen, click Cloudflare. The plugin loads the Cloudflare home screen.
- Click the Domains button in the toolbar at the top of the page.
- The plugin displays the setting for the primary domain. To choose a different domain, use the list box located at the left of the toolbar.
- At a minimum, you should make sure Cloudflare is enabled for your domain's www CNAME record. To do this, follow these steps:
- Locate the CNAME record for your www domain:

If the Use Cloudflare column value is set to Off, click it to turn Cloudflare on.
It can take a few minutes for the DNS changes to propagate through the Cloudflare network.
- To disable Cloudflare, when the Use Cloudflare column value is set to On, click it to turn Cloudflare off for the specific domain.
Changing Cloudflare settings
Each of the settings controls described below include a Help link at the bottom right. The Help link displays a brief help text and may include links to more detailed information on the Cloudflare site.
To change Cloudflare settings using the cPanel Cloudflare plugin, follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see
this article.
- In the SOFTWARE section of the cPanel home screen, click Cloudflare.
- Click Home. The following options appear:
- Always Online: To allow Cloudflare to display cached content to visitors even when your server is unavailable, confirm that this option is set to On.
- IPv6 Compatibility: A2 Hosting currently does not support IPv6 addressing.
- Caching Level: You can select a caching level for your site, but Cloudflare recommends the Standard level.
- Purge Cache: To clear all of your web site resources from the Cloudflare cache, click Purge Cache.
Click Settings. The following options appear:
There may be certain Cloudflare features and settings that you cannot manage using the cPanel plugin. You can manage these features instead by logging in to Cloudflare directly.
Viewing site statistics
To view site statistics using the cPanel Cloudflare plugin, follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see
this article.
- In the SOFTWARE section of the cPanel home screen, click Cloudflare.
- Click Analytics.
- Click the appropriate tab for the type of statistics you want to view:
- Requests: This tab displays statistics about requests to your site through Cloudflare.
- Bandwidth: This tab displays information about the amount of bandwidth used through Cloudflare.
- Unique Visitors: This tab displays statistics about the number of visitors to your site.
- Threats: This tab displays information about any threats to your site over the past month.
Cloudflare updates site statistics every 24 hours.
Enabling DDoS protection
You can use Cloudflare to help defend against DDoS (distributed denial-of-service) attacks on your site. For information about how to do this, please see this article.
You may have activated your Cloudflare account directly through the Cloudflare web site. If so, then you should also configure your Cloudflare settings by logging in directly to https://www.cloudflare.com instead of using the cPanel plugin.
For more information about Cloudflare, please visit https://www.cloudflare.com.