Articles on: Web Hosting

How to use Cloudflare with a Namecheap domain and connect it to cPanel

What is Cloudflare? Cloudflare is a content delivery network and DDoS mitigation company. It primarily acts as a reverse proxy between a website's visitor and the Cloudflare customer's hosting provider.

Let’s find out how to use Cloudflare with a Namecheap domain and connect it to cPanel.

How to use Cloudflare with a namecheap domain and connect it to cPanel

We first need to sign up for Cloudflare. Click here to visit the Cloudflare website. Once on the website, click “Sign Up” on the top right-hand side corner.

Fill out the signup form. You will need to activate your account by clicking an activation email in your emails.

Once signed up, Click “Add a Site” on the right-hand side.

In this example, we will use Enter the domain into the input box. Once complete, click “Add site”.

Select a plan. Each plan has different advantages. In this example, we will simply be using the “Free” plan. This plan is perfect for small sites or forums.

The DNS Management page will show up. Leave all of the current records as is. This is to ensure that every record is going to transfer over to Cloudflare. Click “Continue”

It is now time to change the nameservers of the domain. Cloudflare will provide you with the new nameservers. In this case, Cloudflare has provided us with the following nameservers:

To change your nameservers, head over to the Namecheap dashboard. On the right hand side, click “Manage”.

Under the “Domain” tab, Find the “Nameservers” section and click on the dropdown box. From the dropdown, Select “Custom DNS”.

Enter the new nameservers that Cloudflare has provided. Once complete, click the tick icon.

Note: The nameservers may take up to 48 hours to update!

Head back to Cloudflare and click “Done, Check Nameservers”. Note that Registrars can take 24 hours to process nameserver updates. You will receive an email when your site is active on Cloudflare.

Once the nameservers have been added, you should see a success message on the Cloudflare dashboard

Since our domain is not with sparked host, we have to direct our domain to our web hosting package. On the left-hand side, click “DNS”

Delete all existing DNS records. These are old records that Namecheap has automatically assigned to our domain. We do not need them anymore. Click “Edit” and then “Delete”.

Add an “A” record by pressing the “Add Record” button. You will need to fill in the following:

Name - This is the domain name. We want to use @ as that is the root of our domain.
IPv4 Address - This is the IP of the web server.
Proxy Status - This is whether the record should go through Cloudflare

To get our IPv4 Address, Head over to the cPanel dashboard. On the right-hand side, you can see the IPv4 Address of the web server.

Once all of the details have been filled in, click “Save”

Cloudflare is now protecting your site! You are still able to access your website!

Note: All domain record work has to be done on Cloudflare. You are NOT able to add/edit records on cPanel when using Cloudflare!

If you require any further assistance, please create a ticket here.

Created By: Greg K.

Updated on: 22/12/2022

Was this article helpful?

Share your feedback


Thank you!