I have a website on a Namecheap shared hosting server and I’d like to use Cloudflare (free tier) for it. The main content of the website is on a subdomain. Root domain has just a dummy landing page. I noticed that when I try to add the website / domain Cloudflare scrapes the DNS records for the root domain but not for the subdomain.

A support agent from Namecheap instructed me that I should at least have an A record for the subdomain before I switch to Cloudflare’s DNS servers. She also gave me an export of all my current DNS records that I can use in the file upload function in the Cloudflare record wizard:

enter image description here

I don’t mind the fact that the whole traffic to the domain (including dummy landing page at root) would go through Cloudflare. I’m just concerned what would happen if I don’t have the right DNS records before I change DNS servers.

I want to be able to use my website during the weekend without any service interruption but at the same time I’d like to sign it up for Cloudflare. How do I do this without screwing up?


As far as I understand it, CloudFlare offers two services, DNS hosting and web proxying. Using CloudFlare as the domain's DNS nameserver is a prerequisite for the web-proxy service, but it does not imply that the whole domain would be proxied: they still remain two separate services.

As for the main question:

Verifying CloudFlare's DNS configuration

After you've uploaded the DNS export file into CloudFlare, but before changing the domain's nameservers, you can use DNS query tools such as dig or host or nslookup to verify that CloudFlare has the correct data.

Start with querying the current "global" DNS for your domain or subdomain, then immediately compare results with a query made directly to CloudFlare's nameservers:

$ dig example.com A
$ dig example.com A @blah.ns.cloudflare.com

$ host -t A example.com
$ host -t A example.com blah.ns.cloudflare.com

C:\> nslookup -q=A example.com
C:\> nslookup -q=A example.com blah.ns.cloudflare.com

If they both return identical A records, then the (sub)domain will behave identically as well. Repeat the same check for AAAA (IPv6) and MX (email).

Using subdomains with CloudFlare

If you don't actually want the whole domain's DNS to be Cloudflare-based, then you don't have to change the whole domain's nameservers. You can delegate a subdomain to Cloudflare, in the same way that the TLD has currently delegated your domain to Namecheap.

Such a delegation is created just by adding NS records at the subdomain. For example, where an ordinary "web" subdomain looks like this:

mysubdomain    A

a delegation will look like this:

mysubdomain    NS    blah.ns.cloudflare.com.

For most purposes, the delegated subdomain acts as its own domain.

  • Thanks a lot! So to put it in simple words (since OP is a simple man): "make sure A, AAAA and MX records are identical for both root domain and subdomain and you should be fine"? Right now I don't care about the content in the root but at some point, it would be beneficial if that goes through Cloudflare as well so I'll stick to the whole domain scenario. – Dean Panayotov May 10 '19 at 6:33
  • Generally yes. If the dig/nslookup answers are the same, they will work the same. Web browsers only look at A/AAAA, there isn't anything hidden. (Except for DNSSEC, but you can simply not activate DNSSEC at all.) – user1686 May 10 '19 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.