Bobcares

Cloudflare No or Invalid host_key : How to solve ?

PDF Header PDF Footer

No or Invalid host_key in Cloudflare shows up if we try to use the API key from the Cloudflare account as the Hosting API key.

As part of our Server Management service, Bobcares responds to all inquiries, no matter how big or small.

Let’s take a look at how our Support team helped one of our customers fix the issue.

No or Invalid host_key in Cloudflare

Login to cPanel on the WHM/cPanel server and click the Cloudflare icon. When we submit the login form, the message “No or invalid host key” appears. If we try to use the API key from the Cloudflare account as the Hosting API key, we’ll get this message.

Troubleshooting tips

  • Please ensure that we have created a Cloudflare account through their website, and that we are able to access the Cloudflare dashboard using our cPanel credentials. This will help us in getting the key to resolve the error: no or invalid host_key in cloudflare.
  • Use the following code if the root directory is missing:
    bash <(curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.install.sh) -k [OUR_HOST_API_KEY] -n '[DDOMAIN_NAME]'

    OR

    echo "yourhostkey" > /root/.cpanel/datastore/cf_api

    chmod 600 /root/.cpanel/datastore/cf_api

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, our Support team demonstrated how to resolve the error: No or Invalid host_key in Cloudflare.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Get featured on the Bobcares blog and share your expertise with a global tech audience.

WRITE FOR US
server management

Spend time on your business, not on your servers.

TALK TO US

Or click here to learn more.

Speed issues driving customers away?
We’ve got your back!