Where should i import my ns?

hi, im new to cloudflare services i added a domain to my account and want to add my hosting name servers but when i trying to do this in DNS>Records and put @ for root name section and type my ns for example ns1.dns-parking.com it’s says: “Valid IPv4 address is required” where should i add my name servers?
sorry for bad engish,
thanks

Welcome to the Cloudflare Community. :logodrop:

NS records will always be hostnames. IPv4 addresses are for A records. You should not be adding NS records at the root of your zone. Those are managed automatically by Cloudflare and will always be the pair you see assigned in the dashboard.

You may want to see if the DNS guide helps you find the right steps for your task.

thanks for your help! as I understand when I import my domain cloudflare automatically configure my NS so for example if i change my hosting provider and need to change my NS then how should i update those? shall i import my domain again?

Hi,

as @epic.network epic.network said when you add a site, Cloudflare imports the DNS records but skips out the NS records because it automatically uses its own (you can see them listed in the dashboard below the imported DNS records).

When you change a hosting company you would need to manually edit all old records and replace them with new values. Or do what I do:

  1. Export the full DNS zone to a file from your host.
  2. Delete all DNS records from Cloudflare.
  3. Import the file into Cloudflare.
  4. Note that Cloudflare will also import NS records from your host, so you need to delete them.

Can you @epic.network please confirm if this is correct?

Are you referring to all of your DNS records as NS records? NS is a specific RR type that indicates the hostnames of your nameservers. You don’t change your NS records when you change hosting. You change your A records and, if you are also moving email providers, you would change your MX records, too.

You can certainly export and import data from your new host as @kejatz does, or you can edit the existing record to use the new IP provided by your new host. Only you can decide which approach works best for your needs.

2 Likes

@epic.network I recently switched from shared to VPS with my personal NSs. When I imported the DNS file from my VPS to Cloudflare it imported those NS as well. Was I right to remove them?

If they were at the root of your zone, yes. You can remove them from the file before you import to avoid that in the future.

If you have NS records that are delegating a child zone, don’t delete those. That is a less common configuration that you would usually be aware of, so you probably won’t need to worry about it.

2 Likes

I do remove them from the file. No child zone.

Thank you!

1 Like

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