Adding my hosting provider's nameservers to cloudflare

Hi. I want to add my hosting provider’s name servers to my domain after I has linked it to Cloudflare. The problem is that my website’s ip change and won’t stay still. Also I am running a script which uses my sub-domain and the hosting provider should have the ability to change them. How can I set nameservers for my domain in clodflare dns editior for my main domain not sub domains?

Cloudflare has an API you could call.
Alternatively you could use to update an IP in Cloudflare. It supports the same kind of API that routers use the implement “dynamic dns”. There are also a bunch of software programs that you can also use. I use ddclient myself. You have to go on there and create an account, point it at your Cloudflare, then configure your router/client software to keep your IP up to date.
I think I remember having trouble with it though because they keep getting API ratelimited…

I think I may have misunderstood your question. The above would work if you want to just set the IP yourself using a script.
If you don’t want to do that you could use a CNAME (and Cloudflare’s CNAME flattening) to point the root of your domain to whatever your hosting provider’s DNS name is. Then you could still continue to use subdomains as you see fit. Just create a CNAME record with the name set to @ and the value set to whatever dns name you want the IP address copied from.

Thanks, I know that. I want my hosting provider to be able to change my whole dns exactly like if I changed my nameservers on registrar panel to the provider’s nameservers. I have read I can set namesrvers but they are for sub domains.

I want to change my namesrevers using NS record in Cloudflare to my provider’s.
when I add two values as in picture nothing change. image

You can only delegate subdomains. They won’t be able to update your root.

You can use a small script that dies the updates via the API for you. Or DDClient, or DNS-o-Matic

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