How does Cloudflare decide which NS to assign for a domain?




I’m setting up a WHMCS system and I want to automate the NS creation with CloudFlare via API; the module I’m using in WHCMS ask me to give it a default NS so it can go through the API and create all the required DNS zones.

The thing is, Cloudflare gives me allmost always the same NS, wich are the following:

But sometimes, just sometimes, those NS changes to other ones.

I want to automate WHMSC, thus, also I want to automate this step.

What’s the possibility that I can set only one pair of NS for all domains so I can automate this step? And, How does Cloudflare decide which NS to assign for a domain??



Hey there. This article may shed a little light onto how Cloudflare assigns nameservers

Possibly seems very slim-to-zero. Someone from Cloudflare would need to confirm though.


Hello Andy!

Thanks a lot, your information helped me a lot! :smiley:


Hi Javier,

What was your solution to this problem? Are you using CloudFlare for DNS for your WHMCS Hosting, etc.?