2

I am in the process of trying out CloudFlare. I host my own DNS (b.example), and I have created a distinct third level zone (a.b.example). I put glue records in the b.example zone and setup the a.b.example zone in its own separate file. (I am using BIND on linux boxes). Testing this on intodns.com gives a green light (save for a "WARNING: Looks like the parent servers do not have information for your TLD when asked. This is ok but can be confusing.")

However when I try to add this zone to CloudFlare's control panel I get:

Please ensure you are providing the root domain and not any subdomains (e.g., example.com, not subdomain.example.com) (Code: 1116)

I have tried a few variations (set an A record for the a.b.example either in the parent, child or both zones) withouth obtaining any change.

Is what I am trying to do possible? I do not want to turn the entire DNS management of b.example over to CloudFlare.

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
Alien Life Form
  • 2,309
  • 2
  • 21
  • 32

3 Answers3

6

The problem with your overall goal is that Cloudflare only accepts domain names directly under a public suffix, which is a policy decision on their part. (Public suffix like com, co.uk, etc. Ie, something like this list, although I don't know if that is the list they operate based on.)
This is with the exception that their partners have the option of using a CNAME-based solution.

In general terms (ignoring the Cloudflare specifics), if you delegate something under one of your zones to someone else's nameservers, what you add is just the NS records.
The new zone should exist on their nameservers, not on yours (unless you're specifically delegating the new zone to both, in which case you will want to ensure that the zone is actually kept synced, via AXFR or otherwise).

Ie, if you have example.com and want to delegate sub.example.com to ns.other.example you would add:

sub.example.com. IN NS ns.other.example.

to your example.com zone.

The zone sub.example.com would separately be added on the ns.other.example nameservers by whoever controls that.

Håkan Lindqvist
  • 35,011
  • 5
  • 69
  • 94
5

Apparently Cloudflare doesn't support what you want to achieve. They seem to require that you delegate to them directly from the registrar level.

This seems to be related post on their support site: https://support.cloudflare.com/hc/en-us/articles/220981767-Can-I-add-a-subdomain-on-Cloudflare-.

Tomek
  • 3,390
  • 1
  • 16
  • 10
2

I can't quite follow your explanation, but for starters when you delegate a subdomain you don't create a zone file for it on your own name servers.

Delegating a subdomain to different name servers, Cloudflare's or anybody else's, is as simple as creating the necessary NS records in the zone for your domain pointing to the name servers you get assigned:

a.example.com.      3600    IN  NS  alice1.ns.cloudflare.com.
a.example.com.      3600    IN  NS  bobby2.ns.cloudflare.com.

That is all you need to do in your own zone, on your own name servers.

And then in the Cloudflare control panel you create all the records within that a.example.com subdomain, such as A, MX, CNAME etc for *.a.example.com or the APEX a.example.com

HBruijn
  • 77,029
  • 24
  • 135
  • 201
  • 2
    I delegated a subdomain to my own nameservers (which can be done) in a separate zone so I could delegate it to cloudflare. However cloudflare is not accepting my setup - it will only accept the delegation of the entire 'example.com' zone. So I never get to change nameservers, etc. – Alien Life Form Oct 09 '18 at 16:05