How To Setup And Configure CloudFlare
The CloudFlare plugin comes pre-installed on our Shared and Business hosting packages and can be accessed via the Software section in cPanel.
If you’re on a Cloud or Dedicated server you’ll need to install the plugin using the steps below.
Step One: Using the root user, access the server via SSH
Step Two: Issue the following while logged in via SSH
curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.install.sh -k HOST_API_KEY -n ‘YOUR_COMPANY_NAME’
HOST_API_KEY will look similar to 56yt8x9s987dfy4324bnv ‘YOUR_COMPANY_NAME’ should be surrounded by single quotes like ‘Hostwinds’
Step Three: This begins your installation of Cloudflare. cPanel plugin files will begin first, then mod_cloudflare. Depending on the server load time will take between a few seconds and 5 minutes. The process will be complete when you see, Cloudflare module installed successfully.
Step Four: Cloudflare has now been added to your server. The process needs to be repeated for additional servers. Ignore if you have automatic update script running.
Step Five: When finished with the installation you should see the message: “Plugin installed ok, Cleaning up”
How Do I Configure Cloudflare?
The plugin gives you two options for how to use the service.
Option 1: CNAME Setup – The authoritative DNS will continue to point to the customer’s domain. Subdomains will only be pointed to Cloudflare. CNAME only allows protection at a subdomain level, for example, admin.example.com versus example.com.
Option 2: Full DNS Setup – You must make Cloudflare the authoritative DNS by pointing your domain’s name server to their name server. By adding full DNS provisioning you allow root domain and subdomain protection throughout the website.
Partners dictate if they wish to allow Full DNS zone setup for clients and customers. N.B CNAME setup cannot be disabled. Here are the various ways Cloudflare can be enabled.
Step One: Default option – CNAME setup only
Step Two: CNAME and Full DNS setups
You can configure this by editing the config.js. Find it here:
Then update this parameter:
“featureManagerIsFullZoneProvisioningEnabled”: false – Full DNS disabled (all customers will use CNAME) or featureManagerIsFullZoneProvisioningEnabled”: true