Question about glue records, custom nameserves

Hi, i own a hosting reseller plan that uses custom nameservers under my primary domain, e.g: domain(.)com
the nameservers under my reseller hosting are ns1(.)domain(.)com and ns2(.)domain(.)com which i use to point my clients domains. eg: clientdomain.com points to ns1(.)domain(.)com and ns2(.)domain(.)com

So far so good, the problem is when i try to use cloudflare on my primary account (domain(.)com, where i have my personal site) which actually has its namerservers to ns1(.)domain(.)com and ns2(.)domain(.)com with its glue record in the registrar panel.

If i change my domain.com nameservers (not glue records) to cloudflare free dns (amy and andy) my clients domain (e.g: clientdomain(.)com) failed to resolve, because they look for ns1(.)domain(.)com and ns2(.)domain(.)com in their records and domain(.)com is resolving to cloudflare that is not set any nameserver at all.

I have readed about glue records and all this kind of dns stuff but not fully understand.

This can be done or it is impossible?

thanks and sorry for my english

Hi! So first, what glue records really do:

A note: I’m also going to ignore caching because it doesn’t matter, and skip a ton of other details, I’m trying to make this simple.

A user wants to visit example.com., so they ask their DNS resolver and it does all the rest of the work to eventually return the answer.

The DNS resolver will first ask the root (.) for info about com., it will then ask those servers for info about example.com. only to be told that example.com. has a nameserver of bob.ns.cloudflare.com.

Now the DNS resolver needs to ask bob.ns.cloudflare.com. for information, so again we ask the . root, then ask com. to help us find cloudflare.com. And this is where we have a problem, because the answer is ns3.cloudflare.com.. This is good to know, but we are already looking for information about cloudflare.com., so now we have hit a loop.

This is where glue records come in. When we ask the com. roots for cloudflare.com., it will not only tell us ns3.cloudflare.com., but it will also helpfully include a clue that ns3.cloudflare.com has an A record of 162.159.0.33 (so we can now fully resolve cloudflare.com and work backwards to answer the user).

Glue records are those hints.

You only need glue records when you are resolving a domain who’s nameservers exist as records under that same domain. Outside of this glue records are not needed or used.

So, from your description, I don’t believe glue records are actually your problem, because I believe you are pointing domain.com. to your Cloudflare DNS servers amy and andy.

Instead, I suspect you want to first verify in your Cloudflare dashboard that you have ns1.example.com set to the correct IP, and that the record is not proxied (it must have a :grey: and not :orange:).

If you have a Business or Enterprise account then you can configure custom nameservers such that you will need glue records, but in this case you are not going to use amy.ns.cloudflare.com. anymore as you will use your own custom records instead. In this situation glue records are needed, and Cloudflare will give you the information that you need.

If you can post your domain name and the full hostname of one of your nameserver records I can try to take an educated guess about what is actually happening.

With your explanation I understood how glue records work but I still do not understand how to apply that to my case, I explain with the real domain:

I have my personal site diegopaz(.)net which is the primary domain of a reseller hosting account which has ns1(.)diegopaz(.)net and ns2(.)diegopaz(.)net as custom dns(.) These dns are the ones that I must configure in the domains of my clients so that they can resolve to my hosting reseller where their sites are hosted, an example is: saveyourselfecologic(.)com

My doubt is that if I change the dns of diegopaz(.)net domain to those of cloudflare (amy and andy) to take advantage of cloudflare, I can no longer use ns1(.)diegopaz(.)net and ns2(.)diegopaz(.)net to resolve domains from my clients because the main domain (diegopaz(.)net) no longer points to them but to cloudflare dns

Also if my domain diegopaz(.)net is pointing to the dns of cloudflare I would no longer need the glue records, but in that case how do the domains of my clients know that ns1 and ns2(.)diegopaz(.)net points to their corresponding ip?

My objective is to use my custom dns in my clients domains, and also uso cloudflare free in my domain diegopaz(.)net using its dns

I hope I was clear and sorry for my English, i use google translate

and thanks for your help!

You can safely change your domain to use Cloudflare’s nameservers, just be sure that your ns1/ns2 A (and AAAA, if applicable) records still exist.

No glue is required in this case because the lookup process for your client’s domain will point to ns1.diegopaz.net, but when a resolver looks that it it can figure it out because Cloudflare’s nameservers are responsible for answering the A/AAAA record request.

Excelent!! thedaveCA, i have configured the a records for ns1 and ns2 in cloudflare and now all is working! thanks for your help!

1 Like

Sweet! Happy to help. DNS is fun, at least for some definitions of fun.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.