Set up advanced nameservers
Last updated Jul 29, 2026 Advanced nameservers included with Foundation DNS are an opt-in configuration.
Note
After enabling advanced nameservers, standard nameservers still respond to DNS queries.
Before you begin
Before opting in for advanced nameservers, consider the following:
- To use your own nameserver names with Advanced anycast network groups, create an Advanced Custom Nameserver set. Zone, account, and tenant custom nameservers do not support Advanced anycast network groups. A zone can only use one nameserver configuration at a time.
Differences from standard nameservers
Some behaviors are different from standard Cloudflare nameservers:
- Wildcard records are still supported but, with advanced nameservers, a wildcard record (
*.example.com) will not apply to a subdomain that is an empty non-terminal. An empty non-terminal is a node in the DNS tree that has no records associated with it but has descendants that do, as exemplified below. This behavior is in compliance with RFC 4592 ↗︎, which defines the role of empty non-terminals in wildcard resolution.
<details>
<summary>
Example
</summary>
DNS management for example.com
| Type | Name | Content |
|---|---|---|
| A | * | <code>192.0.2.1</code> |
| A | a.b | <code>192.0.2.5</code> |
In this example, <code>a.b.example.com</code> is a descendant of <code>b.example.com</code>, and <code>b.example.com</code> is an empty non-terminal. This means that the wildcard <code>*.example.com</code> will not apply to <code>b.example.com</code>.
</details>
- Subdomain delegation: once a subdomain is delegated via NS records, Cloudflare will not serve any other records (such as A, TXT, or CNAME) on that subdomain from the parent zone, even if those records exist.
<details>
<summary>
Example
</summary>
DNS management for example.com
| Type | Name | Content |
|---|---|---|
| NS | www | ns1.externalhost.com |
| NS | www | ns2.externalhost.com |
| TXT | www | "5bb16e6b5a444eedb48ace40c471bcc9" |
| A | www | <code>192.0.2.1</code> |
In this example, the TXT record and the A record for <code>www.example.com</code> will not be served.
</details>
Enable on a zone
To enable advanced nameservers on an existing zone:
- Opt for advanced nameservers on your zone:
- In the Cloudflare dashboard, go to the DNS Records page. Go to Records ↗
- In the Cloudflare nameservers card, enable Advanced nameservers.
- After you refresh the page, the card will display the values for your advanced nameservers
NSrecords.
Use the Update DNS Settings endpoint to send a PATCH request like the following:<details><summary>
Required API token permissions</summary>
At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required: - <code>Zone DNS Settings Write</code> - <code>DNS Write</code></details>
Update DNS Settingsbash
bash
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:
- If you are using Cloudflare Registrar, contact Cloudflare Support to have your nameservers updated.
- If you are using a different registrar or if your zone is delegated, manually update your nameservers.
Caution
Make sure the values for your assigned nameservers are copied exactly.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/dns/foundation-dns/setup/#page","headline":"Set up advanced nameservers","description":"Set up advanced nameservers for your Foundation DNS zone.","url":"https://developers.cloudflare.com/dns/foundation-dns/setup/","inLanguage":"en","image":"https://developers.cloudflare.com/dns/foundation-dns/setup/og.png?v=918cfdb23d1fbaac","dateModified":"2026-07-29","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Manage Cloudflare nameservers for your zones. title: Nameservers image: https://developers.cloudflare.com/dns/nameservers/og.png?v=115084dd9673af4c
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/dns/llms.txt
Use this file to discover all available pages before exploring further.
Docs