What would happen when NS pointed to Cloudflare but not added to account?

I register 100+ domains every month so sometimes I don’t have enough time to manage some of the domains. Last month, I did the same way as usual. Nameservers of the domains are automatically set to my CF nameservers right after registration.
Example:
ns1.cloudflare.com
ns2.cloudflare.com

Some of the domains are not yet added to my CF account. But then I found that one of the domains has redirected to a website that not belonged to me. I checked the NS servers of the domain with some online tools and found the NS is not completely the same as what I set.
Like this
ns2.cloudflare.com
ns3.cloudflare.com

Then I login to my domain provider and found the NS are correct.ly set I am confused.

Is this because I set NS to cloudlfare but didn’t add the domain to CF account? I suppost I would just get DOMAIN_NOT_RESOVED instead of redirecting to other user’s website.

Yes. You should not change the nameservers until you added the domain. Nameservers are domain specific, you don’t have a unique nameserver pair. While they are often the same across zones in an account that is not guaranteed.

1 Like

Thank you for the reply. My points is that my NS is set to on registration automatically:
ns1.cloudflare.com
ns2.cloudflare.com

But then when I check NS of the domain, it becomes:
ns2.cloudflare.com
ns3.cloudflare.com

which I didn’t ever change it the second time.

I am not quite familiar with NS. So if the domain has set NS to ns1 and ns2 but not added to CF account, it will automatically try to find account that match one of the NS, namely the account with ns2 and ns3?

No, the nameservers would not change. If they are changed without your knowledge you should contact your registrar to find out why that happened.

I’m assuming you are using ns1/ns2/ns3 as examples here as Cloudflare’s nameservers are name.ns.cloudflare.com

You should add the domain to Cloudflare and then change the nameservers to the ones requested. You can do this programmatically using the API if you have a large number of domains.

1 Like

I’m assuming you are using ns1/ns2/ns3 as examples here as Cloudflare’s nameservers are name.ns.cloudflare.com

Yes. Those are examples. I set the two CF provide to me.

Thank again for the reply. That’s what I am worring about. I set all domain NS to the same one automatically on registration. As the domain owner, I thought only I could change the NS. And there is not record of changing NS. I am worrying if the registrar…

I really hope it was just some stupid mistake made by me.

Don’t do that. Period. You don’t have CF nameservers.

It’s because you have a process which fails to follow security best practices. You are pointing your domains to nameservers you don’t control. You registrar likely provides nameservers of their own for you to use. You should set them to that until you decide to use Cloudflare and the. Use the pair which Cloudflare assigns when you add the zone.

2 Likes

Correct. And you changed them to nameservers you don’t own or control and someone exploited that security failing in your domain management process.

2 Likes

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