Skip to content

Custom Nameservers and Domain Registration on Cloudflare — Complete Guide

DodaTech Updated 2026-06-23 4 min read

In this tutorial, you'll learn about Custom Nameservers and Domain Registration on Cloudflare. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

This tutorial covers everything about custom (vanity) nameservers on Cloudflare — what they are, why you might need them, and how to set them up. You will also learn about domain registration through Cloudflare Registrar and how custom nameservers affect your DNS management.

Why Custom Nameservers Matter

When you use Cloudflare's default nameservers, your DNS records look like darl.ns.<a href="/web-servers-hosting/cloudflare/">Cloudflare</a>.com — which clearly identifies Cloudflare as your provider. Custom nameservers let you use your own domain name for DNS, like ns1.example.com. This matters for three reasons: brand consistency when white-labeling Cloudflare for clients, flexibility if you switch providers later, and professional appearance for enterprise deployments.

Real-world use: DodaZIP's enterprise cloud storage offering uses custom nameservers (ns1.dodazip.com) so that customer domains do not reveal which DNS provider is being used. This is a common requirement for SaaS platforms and agencies that resell infrastructure.

Custom Nameservers Decision Flow

flowchart LR
  A[Need custom NS?] --> B[Are you on Business or Enterprise?]
  B -->|Yes| C[Set up vanity NS in dashboard]
  C --> D[Register glue records]
  D --> E[Update registrar NS]
  B -->|No| F[Use default Cloudflare NS]
  F --> G[Still works for all plans]
  E --> H[Custom NS active]
  style C fill:#f90,color:#fff
  style E fill:#f90,color:#fff

What Are Custom Nameservers?

Custom nameservers — also called vanity nameservers — replace the default *.ns.<a href="/web-servers-hosting/cloudflare/">Cloudflare</a>.com entries with your own branded nameservers like ns1.example.com and ns2.example.com. They are available on Business and Enterprise plans.

# Default Cloudflare nameservers
dig NS example.com +short
# Expected output:
# darl.ns.cloudflare.com.
# neil.ns.cloudflare.com.

# After custom nameserver setup
dig NS example.com +short
# Expected output:
# ns1.example.com.
# ns2.example.com.

Setting Up Custom Nameservers

Step 1: Configure Vanity Nameservers in Cloudflare

Navigate to the DNS settings page in your Cloudflare dashboard. Under "Custom Nameservers", enter the nameservers you want to use.

# Cloudflare requires at least 2 nameservers, supports up to 5
# Example configuration:
# ns1.example.com  -> 203.0.113.10
# ns2.example.com  -> 203.0.113.11
# ns3.example.com  -> 203.0.113.12

Step 2: Add Glue Records

Glue records are A and AAAA records that tell the global DNS system how to find your custom nameservers. Without glue records, a circular dependency forms: the nameserver for example.com is ns1.example.com, but no one knows the IP of ns1.example.com.

# Typical glue record configuration
# Record type: A
# Name: ns1.example.com
# Content: 203.0.113.10

# Record type: A
# Name: ns2.example.com
# Content: 203.0.113.11

Step 3: Update at Your Registrar

At your domain registrar, replace the existing nameservers with your custom ones.

# Before
darl.ns.cloudflare.com
neil.ns.cloudflare.com

# After
ns1.example.com
ns2.example.com

Domain Registration Through Cloudflare Registrar

Cloudflare Registrar sells domains at cost — no markup. If you register your domain through Cloudflare, custom nameserver setup is simpler because Cloudflare manages both the registration and the DNS.

# Register a domain via Cloudflare API
curl -X POST "https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/domains/register" \
  -H "Authorization: Bearer API_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "domain_name": "example.com",
    "years": 1
  }'
# Expected output:
# {"success":true,"result":{"domain":"example.com","expires_on":"2027-06-23"}}

Verifying Custom Nameservers

After setup, verify that your custom nameservers are resolving correctly.

# Check that your domain's NS records show custom nameservers
dig NS example.com +short
# Expected output:
# ns1.example.com.
# ns2.example.com.

# Verify glue records resolve to IPs
dig A ns1.example.com +short
# Expected output:
# 203.0.113.10

FAQ

What Cloudflare plans support custom nameservers?

Custom nameservers are available on Business and Enterprise plans only. Free and Pro plans must use the default Cloudflare nameservers.

How many custom nameservers can I create?

Cloudflare supports between 2 and 5 custom nameservers per domain. At least 2 are required for redundancy.

Can I use custom nameservers with Cloudflare Registrar?

Yes. Cloudflare Registrar integrates seamlessly with custom nameservers. You can set them up directly in the Cloudflare dashboard without visiting an external registrar.

Practice Questions

  1. What is a glue record and why is it necessary for custom nameservers?
  2. Why are custom nameservers not available on the Free or Pro plans?
  3. What is the minimum number of custom nameservers Cloudflare requires?

Summary

Custom nameservers replace Cloudflare's default *.ns.<a href="/web-servers-hosting/cloudflare/">Cloudflare</a>.com entries with your own branded nameservers. They require glue records to resolve the circular dependency between domain and nameserver. Cloudflare Registrar simplifies the Process by managing registration and DNS in one place. Custom nameservers are essential for white-label DNS and enterprise brand consistency.

Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro — security-first tools for the modern web.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro