How to use Cloudflare for a subdomain (of a domain I own)

Hi there,

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 (screenshot attached).

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?

Thanks a lot!

Edit: 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.

You cant add a subdomain only, so you need to switch the nameservers to those provided by Cloudflare. There should not be any disruption as long as you don’t change your IPs.

Cloudflare scans your domain for about, idk, ~2000 most common records. They don’t do a zone transfer. It’s likely that your subdomain is missing. Things you should do:

Import the zone file provided by Namecheap and double check that all records are added

Lower the TTLs of your existing records at Namecheap to the lowest possible. 300 seconds for example and ensure that the value is here is low as well, in case something wents wrong.

In case you don’t need Cloudflare services, Set all records from :orange: to :grey: on your Cloudflare dashboard. The change the nameservers at your registrar to those provided by Cloudflare. Propagation can need up to 48 hours but this will not cause a disruption.

If you want to use the fancy Cloudflare stuff directly, there might be some additional preparation necessary. Even on a free plan.

Ensure that

  • Cloudflare IPs are whitelisted on your host and that there is no rate limiting
  • you have a valid SSL certificate on your host, in case you want to use SSL. Cloudflare will issue a certificate for you, so wait until SSL is ‘active’ on your dashboard before you switch the nameservers or activate Cloudflare :orange:
  • If you’re using Wordpres, search the forums for common issues
  • Don’t proxy (:orange:) anything that doesn’t use the below mentioned ports. Email for example.

This should help you to reduce the risk of issues and disruptions. Hopefully i dindn’t miss something. And with low TTLs you can deactivate Cloudflare (:grey:) almost immediately.

The following ports are proxied by Cloudflare:


Thank you so much for this extensive answer!

Would the 300 second TTL help with faster propagation next time I change something?

I’m planning to proxy the following A records:

This is pretty much a standard set up, right?


@MarkMeyer pretty much said everything that needed saying, just one more thing

If you plan to proxy HTTPS over that host, you will need a dedicated $10/month certificate from Cloudflare, as the free default Universal certificate does not cover hosts on such a deep level (only immediately beneath the domain).

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.