2

I'd like to selectively turn off CloudFlare ("the orange cloud icon") for some subdomains.

But this would cause downtimes for people with certain network configurations, especially those with exotic DNS servers lagging couple of days to update their cache, still pointing CloudFlare's IP addresses for the requests.

How do I do this with minimum failure?

(I might deploy DNS server on my own but I'm not in an enough plan for CloudFlare to support this. What would happen if I do it anyway?)

1

Just switch off Cloudflare for those subdomains. Turning off Cloudflare using the orange button does not change your DNS records. It just bypasses Cloudflare's caching, performance, and security network. Cloudflare will still route traffic to your server.

There's no need to worry about DNS servers caching old records, because those records won't have changed. Your domain still points to Cloudflare, and any requests Cloudflare receives will bypass their cache as soon as you turn off Cloudflare for the subdomain.

Cloudflare are among the fastest DNS providers in the world (rankings here), so unless you've got a compelling reason to run your own DNS server (i.e. you need a feature that Cloudflare doesn't provide), you may find that it's more trouble than it's worth.

  • To clarify, the DNS records do change under the hood, and caching could theoretically be an issue. When you turn Cloudflare caching off, they automatically change your domain's DNS record to point directly to your server, instead of "through cloudflare" to your server. This DNS change happens quickly behind the scenes due to Cloudflare's low TTL values (unless you manually changed the TTL to be high), so shouldn't cause much of an issue. – Maximillian Laumeister Dec 19 '18 at 5:09
3

Turning off Cloudflare should not cause any trouble. Cloudflare has a TTL of 5 minutes on its nameserver records, so within 5 minutes of gray-clouding a domain the domain records will be updated so browsers once again connect directly to your website.

There are some caveats however. If you use Flexible SSL or Full SSL (not Strict) and your server does not have a trusted HTTPS certificate properly deployed, then all HTTPS connections will break.

In addition, if you plan on turning off Cloudflare permanently and removing your domain from their services, a bit of planning is needed. First configure your nameservers outside of Cloudflare with all the A, AAAA, MX, etc. records that are currently in your Cloudflare account then switch over your domain records to use those nameservers. Then gray-cloud all your Cloudflare records to make them direct connect. Wait at least 48 hours before deleting your domain from Cloudflare, even if you see your new nameservers resolving your site. This is because it can take up to 48 hours for nameserver changes to propagate to ISPs worldwide.

2

But this would cause downtimes for people with certain network configurations, especially those with exotic DNS servers lagging couple of days to update their cache,

Actually, the lag you describe depends on the configuration of the authoritative DNS server (precisely, it depends on the TTL of the response, for each record), not of the configuration of the resolvers. On Cloudflare, this TTL is low (5mn by default). So you shouldn't see this lag.

still pointing CloudFlare's IP addresses for the requests.

Even if a user still uses the Cloudflare IP to access your resource once the record has been turned "grey", this is fine, Cloudflare keeps answering these requests.

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.