Add Custom Domain Mapping site to CloudFlare

How To Add Custom Domain Mapping Site to Cloudflare

If you have recently mapped a custom domain to your blog or website and want to harness the power of Cloudflare, you have come to the right place.

Note: If you are looking for ‘how to add your self-hosted WordPress blog to Cloudflare’, read this Cloudflare tutorial instead.

What Is Cloudflare CDN

Cloudflare is a content delivery network which also provides Internet security services and distributed domain name servers acting as a reverse proxy for websites. Cloudflare protects, speeds up, and improves the reliability of a website or mobile application.

CloudFlare Features

Why You Should Use Cloudflare With

The main reason why you must use Cloudflare with is that – Cloudflare allows you to cache, minify, protect, speed up, use Google Analytics, etc., with your site, which is impossible to do in as they require enterprise-level plans for that level of customization. Also, Cloudflare gives us options to obfuscate email addresses, hide specific content from suspicious visitors, protect your images from off-site linking, etc.,

Here’s the GTmetrix performance report for this blog :

GTMetrix Performance Report.
Thanks to Cloudflare – Look at the Grades! 😀

Here’s the full GTmetrix performance report for my blog – Download/View the PDF.

Steps To Get Started

Step 1 – If you haven’t got an account yet, get one from

Step 2 – Login to your Cloudflare Dashboard.

Step 3 – If you’re new to Cloudflare, click here to enter setup and enter the domain name you want to add to Cloudflare and hit ‘Scan DNS Records‘. It will take around a minute or two to finish scanning the records. Once the scan is complete, hit ‘Continue Setup‘ to proceed to the next step.

Step 4 – In the next step, you need to delete the A records. The scanning process from Cloudflare picks up multiple A records for your domain and displays it along with the other records. This step is very important because your website won’t have a static IP address on’s cloud infrastructure. It will keep changing as they shift data centers.

***Make sure you do NOT delete the other records, such as mail, MX, TXT, etc***

The A records look like 👉 A IP address

Step 5 – In this step, add a CNAME record 👉 is an alias of

It should look something like this –

Cloudflare CNAME configuration for

Don’t forget to replace my domain name with yours!

NOTE: Make sure all the clouds are orange. If not, click on the grey cloud to make it orange. Now all the traffic will go through Cloudflare.

Step 6 – Now finish the setup, that is, follow the onscreen instructions to complete the configuration.

Step 7 – Now, you will need to change your name servers to Cloudflare’s instead of your domain registrar’s.  If you registered your domain through WordPress, use this link to go to domain configuration page. You will need to turn off the option ‘Use Name Servers‘. Then enter the name servers Cloudflare provided you with. Don’t forget to save the custom name servers.

NOTE: If you had registered your domain name through any other registrar than WordPress, then you will need to change your name servers from there. Here’s an easy tutorial by Cloudflare on how to do that.

That’s it. We have finished configuring the custom mapped domain with Cloudflare.

Don’t forget to log in to your Cloudflare dashboard and recheck the name servers to make your domain active on Cloudflare. You can follow the steps given over here to perform the same.

Once your website is active on Cloudflare, you can :

  • Adjust your website’s Security Level
  • Set Caching Levels
  • Set Browser Cache Expiration
  • Turn on Always Online™
  • Auto Minify Static Assets
  • Turn on Rocket Loader™
  • Enable Automatic HTTPS Rewrites, etc.,

Feel free to play with Cloudflare’s settings. If you’re unsure of any option just perform a quick search and you will get the answers!

Also Read: Redirect non-www URLs to www using Cloudflare.

7 thoughts on “How To Add Custom Domain Mapping Site to Cloudflare

  1. Hi there,

    If I am gonna do this, when I try to access, is it just gonna redirect to my site? Or is it gonna show up my site but masked with my domain name?

    1. Hey there, it should work fine if you have properly mapped your custom domain name ( to your subdomain ( Please follow this support document to map your domain name to your site. If you have masked the domain name instead of mapping it, it won’t work properly. To map a domain name you already own to your site, you need to upgrade to one of their paid plans. You can get started by clicking on this link and viewing their latest plans. Hope that helps.
      If you need any further help regarding this, just don’t forget to mention your custom domain name & the subdomain in the comment section and I’ll take a look at it.

  2. Hello, and thank you for this helpful article!

    I am moving my site to a new host. While implementing this, I also want to make my domain registrar (current – Automattic Inc.) independent of the hosting provider. So my question is – would following your advice here, update my domain registrar (as shown on to Cloudflare?

    1. Hey Abhijeet, your domain registration will still be managed by Automattic but your DNS Records will now be handled by Cloudflare (and yes, the WHOIS records will display Cloudflare’s NS instead of Automattic’s NS). Hope that clarifies your doubts.

      1. Thank you Anto. Yes, it does help clarify the distinction between domain registrar and DNS provider 🙂

        And, if you do not mind me asking, brings up a separate question about DNS records – lets say, today I point to Cloudflare.
        After moving the site (to Bluehost), do I need to update both WordPress & Cloudflare OR only Cloudflare records to point to Bluehost?

        1. In this case, just modifying your DNS records at Cloudflare is enough – you won’t be able to add DNS records at once you have changed the nameservers to Cloudflare.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.