With custom (or vanity) nameservers, a domain can use Cloudflare DNS without using Cloudflare-branded nameservers. For instance, you can configure ns1.example.com and ns2.example.com as nameservers for example.com.
To use custom nameservers, a zone must be using Cloudflare as Primary (Full setup) or Secondary DNS provider.
There are two custom nameserver configurations, and a zone can only use one of them:
- Nameserver sets (beta) are created at the account level and assigned to individual zones. This is a modern feature that supports Advanced Nameservers and more.
- Legacy zone, account, and tenant custom nameservers are configured with an
ns_setnumber between 1 and 5.
- Nameserver sets
- Set up zone custom nameservers
- Set up account custom nameservers
- Set up tenant custom nameservers
- Nameserver sets are in beta and available for Enterprise customers, via API only. Once created, a nameserver set can be used by zones in the same account.
- Zone custom nameservers are available for zones on Business or Enterprise plans. Via API or on the dashboard.
- Account custom nameservers are available for customers on Business (after contacting Cloudflare Support) or Enterprise plans. Once configured, account custom nameservers can be used by all zones in the account, regardless of the zone plan. Via API or on the dashboard.
- Tenant custom nameservers, if created by the tenant owner, will be available to all zones belonging to any account that is part of the tenant. Via API only.
Legacy zone, account, and tenant custom nameservers are organized in different sets (ns_set). Each nameserver set must have at least two and no more than five custom nameserver names.
For modern nameserver sets, refer to Limits.
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.