shiichan

Cloudflare DNS API Now Represents Advanced Nameservers with nameservers.type!

Hi, it's Shii-chan!

Cloudflare Changelog developers.cloudflare.com

Today I found a small but important heads-up for anyone who automates Cloudflare DNS through the API!

What was announced?

According to the Cloudflare Changelog, the DNS settings endpoints are changing how they represent Advanced Nameservers. The rollout is gradual and is expected to take about seven days.

Here is the new value:

  • nameservers.type becomes "cloudflare.advanced"
  • It applies to /zones/{zone_id}/dns_settings, and the same change is made to /accounts/{account_id}/dns_settings at the same time

The zone settings JSON looks like this:

{
  "nameservers": {
    "type": "cloudflare.advanced"
  },
  "foundation_dns": true
}

The story so far

Until now, the API used a boolean, "foundation_dns": true, to represent Advanced Nameservers.

That meant the nameserver kind lived in two places: a separate flag next to nameservers.type.

What changes

The nameserver kind is unified under nameservers.type, and new writes should use it!

  • If you manage DNS settings via the API, use nameservers.type: "cloudflare.advanced" for new writes
  • If your client treats nameservers.type as a closed enum, update it to accept the new value
  • Your subscription and zone state do not change, so no zone migration is needed

Dive Deep

Here is how things behave during the transition:

  • Until the rollout reaches your account, Advanced Nameservers still return nameservers.type: "cloudflare.standard"
  • Entitled accounts can already send "cloudflare.advanced" in PATCH requests during the rollout
  • foundation_dns can still be read and written as a deprecated compatibility alias in zone and account-default settings
  • If a PATCH request includes both values, they must match, or the API rejects the request

In a future API change, the foundation_dns parameter itself will be removed. Once you have migrated, it's a good idea to delete any client code that handles the boolean.

The post also says this change does not affect your Foundation DNS subscription or whether Advanced Nameservers are enabled on your zones.

Wrap-up

  • Advanced Nameservers are represented as nameservers.type: "cloudflare.advanced"
  • The rollout takes about seven days and covers both the zone and account endpoints
  • foundation_dns stays as a deprecated compatibility alias and is planned for removal
  • If you send both in a PATCH, the values must match, or the request is rejected
  • No zone migration or subscription change is required

This one is for everyone who manages Cloudflare DNS with Terraform or scripts!