Knowledge Base

How to configure CloudFlare

This article describes how to use cPanel to configure CloudFlare 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.
  • To use the CloudFlare cPanel plugin, your account domain must use A2 Hosting's name servers.

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.

Using the cPanel plugin

If you activated your CloudFlare account using cPanel, use the integrated CloudFlare plugin to configure your site. To do this, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. In the Software/Services section of the cPanel home screen, click CloudFlare. The plugin loads your current CloudFlare configuration.
  3. On the Activate CloudFlare page under CloudFlare Status, confirm that your root domain (for example, example.com) has an orange cloud (CloudFlare - orange cloud icon) icon next to it.
  4. Click [Edit]. A list of CNAME and A records for your account appears.
  5. At a minimum, you should enable CloudFlare for the www CNAME record by clicking the gray cloud (CloudFlare - gray cloud icon) icon next to it (it may already be enabled).
    It can take a few minutes for the DNS changes to propagate through the CloudFlare network.
  6. Click the gray cloud (CloudFlare - gray cloud icon) icon next to any other records that you want to enable for CloudFlare.
    The CloudFlare network only proxies web traffic on ports 80 (non-secure HTTP) and 443 (secure HTTPS). Therefore, to prevent possible performance issues, you should not enable CloudFlare for any of the following subdomains:
    • cpanel
    • ftp
    • mail
    • webdisk
    • webmail
    • secure
    • whm
    • Name servers (for example, ns1.example.com or ns2.example.com)

    To view a complete list of subdomains that should not be used with CloudFlare, please visit https://support.cloudflare.com/hc/en-us/articles/200169626-What-subdomains-are-appropriate-for-orange-gray-clouds-.

Viewing site statistics and settings

To view site statistics and settings using the cPanel CloudFlare plugin, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. In the Software/Services section of the cPanel home screen, click CloudFlare.
  3. Click Statistics and Settings for the domain you want to view.
  4. Under Basic Statistics for example.com, where example.com represents your domain name, you can view basic statistics about your site.
    CloudFlare updates the basic statistics every 24 hours.
  5. Under CloudFlare Settings for example.com, where example.com represents your domain name, you can view and modify the following settings:
    • In the CloudFlare Account Type list box, you can upgrade from the free version to CloudFlare Pro.
      For more information about CloudFlare's different plans, please visit https://www.cloudflare.com/plans.
    • In the CloudFlare security setting list box, you can set the security level. The default level is medium. CloudFlare recommends using a medium or high security level setting during normal site operation.
      For more information about CloudFlare security, please visit https://www.cloudflare.com/features-security.
    • When you are developing your site, you probably want to be able to see changes immediately. To bypass CloudFlare's cache during development, enable Development Mode.
    • To clear all of your web site resources from CloudFlare's cache, you can do a Cache Purge.
    • To allow CloudFlare to display cached content to visitors even when your server is unavailable, confirm that the Always Online list box is set to On.
      For more information about CloudFlare's Always Online™ feature, please visit https://www.cloudflare.com/always-online.
    • In the Automatic IPv6 list box, you can disable IPv6 addressing.
      A2 Hosting currently does not support IPv6 addressing.
    • In the CloudFlare caching level list box, you can select a Basic or Aggressive caching level. The basic level caches most static resources, while the aggressive level caches all static resources.
    To view additional statistics and settings, you can configure an account on CloudFlare's main site at https://www.cloudflare.com/login. To access your CloudFlare account for the first time, click I forgot my password. Type the e-mail address you used to activate CloudFlare, and then you can create a password for the CloudFlare web site.

Using the CloudFlare site

If you activated your CloudFlare account directly through the CloudFlare web site, then you should configure it through the site as well at https://www.cloudflare.com.

More Information

For more information about CloudFlare, please visit https://www.cloudflare.com.