INTEGRITY Cloudflare Docs

Set up advanced nameservers

Advanced nameservers included with Foundation DNS are an opt-in configuration.

Before you begin

Before opting in for advanced nameservers, consider the following:

Differences from standard nameservers

Some behaviors are different from standard Cloudflare nameservers:

Example

DNS management for example.com

Type Name Content
A * 192.0.2.1
A a.b 192.0.2.5

In this example, a.b.example.com is a descendant of b.example.com, and b.example.com is an empty non-terminal. This means that the wildcard *.example.com will not apply to b.example.com.

Example

DNS management for example.com

Type Name Content
NS www ns1.externalhost.com
NS www ns2.externalhost.com
TXT www "5bb16e6b5a444eedb48ace40c471bcc9"
A www 192.0.2.1

In this example, the TXT record and the A record for www.example.com will not be served.

Enable on a zone

To enable advanced nameservers on an existing zone:

  1. Opt for advanced nameservers on your zone:

    1. In the Cloudflare dashboard, go to the DNS Records page.

      Go to Records ↗
    2. In the Cloudflare nameservers card, enable Advanced nameservers.

    3. After you refresh the page, the card will display the values for your advanced nameservers NS records.

    Use the Update DNS Settings endpoint to send a PATCH request like the following:

    Required API token permissions

    At least one of the following token permissions is required:
    • Zone DNS Settings Write
    • DNS Write
    Update DNS Settings
    curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_settings" \
    	--request PATCH \
    	--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    	--json '{
    		"nameservers": {
    				"type": "cloudflare.advanced"
    		}
    	}'

    The response body will contain your assigned nameservers in the nameservers object. You will use these nameservers in the next step.

  2. Update the authoritative nameservers at your registrar. This step depends on whether you are using Cloudflare Registrar: