domaindetails.com
Knowledge Base/Domain Management/How to Set Up Custom Nameservers (Vanity NS) (2025)
Domain Management

How to Set Up Custom Nameservers (Vanity NS) (2025)

Step-by-step guide to creating branded nameservers (ns1.yourdomain.com) including glue records, provider setup, and when custom NS makes sense.

20 min
Published 2025-12-01
Updated 2025-12-01
By DomainDetails Team

Quick Answer

Custom nameservers (also called vanity nameservers or branded nameservers) let you use hostnames like ns1.yourdomain.com instead of generic provider names like ns1.provider.com. Setting them up requires: (1) creating glue records at your domain registrar to break the circular DNS lookup problem, (2) configuring A records in your DNS zone pointing to the same IPs, (3) adding NS records referencing your custom nameserver hostnames, and (4) updating your domain to use the new nameservers. Custom nameservers are valuable for branding, reseller scenarios, and maintaining DNS independence, but add complexity most website owners don't need.

Table of Contents

What Are Custom Nameservers?

Custom nameservers replace generic DNS provider hostnames with your own branded names.

Standard vs. Custom Nameservers

Standard nameservers (what most people use):

ns1.cloudflare.com
ns2.cloudflare.com

Custom/vanity nameservers (branded):

ns1.yourbrand.com
ns2.yourbrand.com

Both point to the same DNS infrastructure, but custom nameservers display your domain name.

Terminology

Different terms describe the same concept:

Term Meaning
Custom nameservers User-defined nameserver hostnames
Vanity nameservers Branded NS for aesthetic/marketing purposes
White-label nameservers NS branded for reseller use
Private nameservers NS under your own domain
Branded DNS Marketing term for custom NS

What Custom Nameservers Look Like

Typical naming conventions:

ns1.yourdomain.com, ns2.yourdomain.com
dns1.yourdomain.com, dns2.yourdomain.com
a.ns.yourdomain.com, b.ns.yourdomain.com

Enterprise examples:

  • Google: ns1.google.com, ns2.google.com
  • Amazon: ns1.p31.dynect.net (using DynDNS)
  • Microsoft: ns1.msft.net, ns2.msft.net

How Custom Nameservers Work

Understanding the mechanics helps you troubleshoot issues.

The Circular Dependency Problem

Consider this scenario:

  1. User requests yourdomain.com
  2. DNS resolver asks: "What are the nameservers for yourdomain.com?"
  3. Answer: ns1.yourdomain.com, ns2.yourdomain.com
  4. Problem: To reach ns1.yourdomain.com, the resolver needs to query... yourdomain.com's nameservers

This creates a chicken-and-egg problem: you can't find the nameserver without querying the nameserver.

Glue Records: The Solution

Glue records solve this by storing nameserver IP addresses directly in the parent zone (.com zone for a .com domain).

How it works:

DNS Query Flow:
1. Query: What are the nameservers for yourdomain.com?
2. .com TLD servers respond:
   - NS: ns1.yourdomain.com
   - NS: ns2.yourdomain.com
   - GLUE: ns1.yourdomain.com → 93.184.216.34
   - GLUE: ns2.yourdomain.com → 93.184.216.35
3. Resolver can now contact 93.184.216.34 directly

The glue records provide the IP addresses alongside the nameserver names, breaking the circular dependency.

DNS Record Requirements

For custom nameservers, you need three types of records:

Record Type Location Purpose
Glue records Parent zone (via registrar) Provide NS IP addresses at TLD level
A/AAAA records Your DNS zone Authoritative answers for NS hostnames
NS records Your DNS zone Declare nameservers for your domain

Critical: Glue records and A records must contain the same IP addresses.

Understanding Glue Records

Glue records are the foundation of custom nameservers.

What Are Glue Records?

Glue records are A (IPv4) or AAAA (IPv6) records stored at the registry level that specify the IP addresses of nameservers.

Key characteristics:

  • Stored in parent zone (.com, .net, etc.)
  • Created through your domain registrar
  • Only required when NS hostname is under the same domain
  • Must match A records in your authoritative zone

When Glue Records Are Required

Required (NS is subdomain of the domain it serves):

Domain: example.com
Nameservers: ns1.example.com, ns2.example.com
→ Glue records REQUIRED

Not required (NS is under different domain):

Domain: example.com
Nameservers: ns1.myhost.net, ns2.myhost.net
→ No glue records needed (myhost.net handles its own DNS)

Glue Record Format

Glue records specify hostname and IP:

ns1.yourdomain.com → 192.0.2.1
ns2.yourdomain.com → 192.0.2.2

If using IPv6:

ns1.yourdomain.com → 192.0.2.1
ns1.yourdomain.com → 2001:db8::1
ns2.yourdomain.com → 192.0.2.2
ns2.yourdomain.com → 2001:db8::2

Common Glue Record Mistakes

Mistake Consequence
Wrong IP address DNS resolution fails
IP mismatch between glue and A record Inconsistent resolution, failures
Only one glue record Violates DNS requirement for 2+ NS
Forgetting to update after IP change Resolution failure
Using CNAME instead of A record Invalid configuration

When to Use Custom Nameservers

Custom nameservers aren't for everyone. Evaluate your needs.

Good Use Cases

Branding and professionalism:

  • Web hosting companies wanting branded NS for clients
  • Digital agencies managing client domains
  • SaaS platforms with DNS components
  • Enterprises wanting consistent branding

Business requirements:

  • White-label DNS services
  • Reseller hosting operations
  • Managed service providers
  • Franchise businesses

Technical independence:

  • Ability to change DNS providers without visible changes
  • Maintaining consistent NS across provider migrations
  • Control over DNS presentation

When NOT to Use Custom Nameservers

Skip custom nameservers if:

  • You're running a standard website
  • You don't resell hosting/DNS services
  • You want simpler management
  • You're not comfortable with DNS administration
  • Your DNS provider doesn't support it

Standard nameservers are fine for:

  • Personal websites
  • Small business sites
  • Most applications
  • Anyone prioritizing simplicity over branding

Cost-Benefit Analysis

Factor Custom NS Standard NS
Setup complexity High None
Ongoing maintenance Medium None
Branding value High Low
Provider independence High Low
Risk of misconfiguration Medium Low
DNS provider switching Easier Requires NS changes

Prerequisites and Requirements

Before setting up custom nameservers, ensure you have:

Technical Requirements

  1. Domain you control

    • Must be able to modify nameservers
    • Must have access to registrar glue record settings
    • Domain should not be locked
  2. DNS server or service

    • Your own DNS servers (BIND, PowerDNS, etc.)
    • OR DNS provider that supports custom/vanity NS
    • Must accept queries for your nameserver hostnames
  3. Static IP addresses

    • At least 2 IP addresses (one per nameserver minimum)
    • IPs should be stable (not dynamic)
    • Consider both IPv4 and IPv6

Provider Support

Verify your DNS provider supports vanity nameservers:

Provider Custom NS Support Plan Requirement
Cloudflare Yes Business or Enterprise
AWS Route 53 Yes Available on all plans
ClouDNS Yes Premium plans
DNS Made Easy Yes Business plans
Vultr DNS Yes Available to customers
Self-hosted Yes N/A

Note: Many budget DNS providers and free registrar DNS do not support custom nameservers.

DNS Knowledge Required

You should understand:

  • A records and how they work
  • NS records and nameserver delegation
  • TTL values and propagation
  • Basic DNS troubleshooting with dig or similar tools

Step-by-Step Setup Guide

Follow these steps to set up custom nameservers.

Step 1: Plan Your Nameserver Names

Choose hostnames for your nameservers:

Best practices:

ns1.yourdomain.com
ns2.yourdomain.com

Alternative naming:

dns1.yourdomain.com, dns2.yourdomain.com
a.ns.yourdomain.com, b.ns.yourdomain.com

Requirements:

  • Minimum 2 nameservers (DNS specification requirement)
  • Names must be subdomains of your domain
  • Choose memorable, professional names

Step 2: Get IP Addresses from Your DNS Provider

Contact your DNS provider or check their documentation for:

  • IPv4 addresses for your nameservers
  • IPv6 addresses (recommended)

Example from Cloudflare (varies per account):

ns1.yourdomain.com → 173.245.58.xx
ns2.yourdomain.com → 173.245.59.xx

If self-hosting: Use your server's public IP addresses.

Step 3: Create Glue Records at Your Registrar

Log into your domain registrar and add glue records:

General process:

  1. Navigate to domain management
  2. Find "Glue Records," "Host Records," or "Child Nameservers"
  3. Add each nameserver hostname with its IP address
  4. Save changes

Example glue records to create:

Hostname IPv4 IPv6 (if available)
ns1.yourdomain.com 192.0.2.1 2001:db8::1
ns2.yourdomain.com 192.0.2.2 2001:db8::2

Step 4: Configure DNS Zone Records

In your DNS zone for yourdomain.com, add:

A records for nameservers:

ns1    A    192.0.2.1
ns2    A    192.0.2.2

AAAA records (if using IPv6):

ns1    AAAA    2001:db8::1
ns2    AAAA    2001:db8::2

NS records:

@    NS    ns1.yourdomain.com.
@    NS    ns2.yourdomain.com.

Important: IPs must match exactly between glue records and A records.

Step 5: Update Domain Nameservers

Change your domain's nameservers to use the new custom names:

  1. Go to registrar's nameserver settings
  2. Replace existing nameservers with:
    • ns1.yourdomain.com
    • ns2.yourdomain.com
  3. Save changes

Step 6: Wait for Propagation

DNS changes take time to propagate:

  • Glue records: Up to 24-48 hours
  • Nameserver changes: 24-48 hours
  • Full propagation: Allow 48 hours before troubleshooting

Registrar-Specific Instructions

Porkbun

Creating glue records:

  1. Log into Porkbun
  2. Go to Domain Management
  3. Click "Details" for your domain
  4. Click "Manage" under "Glue Records"
  5. In the "Domain Host Management" menu:
    • Enter hostname (e.g., ns1)
    • Enter IP address
    • Click "Submit"
  6. Repeat for each nameserver (minimum 2)
  7. Click edit icon next to "Nameservers"
  8. Remove existing nameservers
  9. Enter your custom nameserver hostnames
  10. Click "Submit"

Note from Porkbun: Their DNS service cannot host DNS for domains using custom nameservers pointing to Porkbun IPs. You need your own DNS server or a provider that supports vanity NS.

NameSilo

Creating glue records:

  1. Log into NameSilo
  2. Go to Domain Manager
  3. Select your domain
  4. Click "Registered Hosts" or "Nameserver Registration"
  5. Add each nameserver:
    • Hostname: ns1 (just the subdomain part)
    • IP Address: Your DNS server IP
  6. Save/Submit
  7. Go to "Change Nameservers"
  8. Enter your custom nameserver FQDNs
  9. Submit changes

GoDaddy

Creating glue records:

  1. Log into GoDaddy
  2. Go to Domain Portfolio
  3. Select your domain
  4. Click "DNS" then "Nameservers"
  5. Click "Add Host" or "Manage Hosts"
  6. Enter nameserver details:
    • Host: ns1
    • IP: Your IP address
  7. Repeat for ns2
  8. Update nameservers to use the host records

Namecheap

Creating glue records:

  1. Log into Namecheap
  2. Go to Domain List
  3. Click "Manage" for your domain
  4. Select "Advanced DNS" tab
  5. Under "Personal DNS Server," click "ADD NAMESERVER"
  6. Enter nameserver hostname and IP
  7. Repeat for additional nameservers
  8. Go to "Domain" tab
  9. Under "Nameservers," select "Custom DNS"
  10. Enter your custom nameserver hostnames

Cloudflare Registrar

For domains registered at Cloudflare:

If using Cloudflare's Account Custom Nameservers with a domain registered at Cloudflare:

  1. Contact Cloudflare Support
  2. Request glue records be added
  3. Provide nameserver hostnames and IP addresses

Cloudflare Support handles glue record creation for their registrar.

DNS Provider Configuration

Cloudflare Business/Enterprise

Cloudflare supports Account Custom Nameservers (ACNS) on Business and Enterprise plans.

Setup process:

  1. In Cloudflare dashboard, go to Account Settings
  2. Navigate to DNS Settings
  3. Click Configure custom nameservers under Account custom nameservers
  4. Enter your nameserver names (e.g., ns1.yourdomain.com)
  5. Cloudflare assigns IPs to each nameserver
  6. Add glue records at your registrar using assigned IPs
  7. Apply custom NS to zones in your account

Requirements:

  • Business or Enterprise plan (contact support for Business)
  • Domain providing NS names in same account OR
  • Add A/AAAA records manually if domain is elsewhere

Key note: Zone custom nameservers are also available for individual zones on Business/Enterprise.

AWS Route 53

Route 53 supports white-label nameservers:

Setup:

  1. Create hosted zone in Route 53
  2. Note the assigned Route 53 nameservers
  3. Go to registered domain in Route 53
  4. Choose "Add or edit name servers"
  5. Enter white-label nameserver names
  6. Specify IP addresses as glue records
  7. Save changes

Important: Route 53 prompts for glue record IPs when you specify nameserver names under the same domain.

ClouDNS

ClouDNS supports vanity nameservers on premium plans:

Setup:

  1. Log into ClouDNS control panel
  2. Enable DNS Branding/Vanity Name Servers
  3. Configure your nameserver hostnames
  4. Note the IP addresses assigned
  5. Create glue records at your registrar
  6. Apply vanity NS to your DNS zones

Self-Hosted DNS (BIND, PowerDNS)

If running your own DNS servers:

BIND configuration example:

; Zone file for yourdomain.com
$TTL 86400
@   IN  SOA ns1.yourdomain.com. admin.yourdomain.com. (
            2024010101 ; Serial
            3600       ; Refresh
            1800       ; Retry
            604800     ; Expire
            86400 )    ; Minimum TTL

; Nameserver records
@       IN  NS  ns1.yourdomain.com.
@       IN  NS  ns2.yourdomain.com.

; A records for nameservers
ns1     IN  A   192.0.2.1
ns2     IN  A   192.0.2.2

; AAAA records for nameservers (if using IPv6)
ns1     IN  AAAA    2001:db8::1
ns2     IN  AAAA    2001:db8::2

; Other records for your domain...
@       IN  A   192.0.2.10
www     IN  CNAME   @

Testing and Verification

After setup, verify everything works correctly.

Test 1: Verify Glue Records

Use dig to check glue records at the TLD:

dig +trace yourdomain.com NS

Look for your custom nameservers in the response with their IP addresses as additional records.

Test 2: Query Nameservers Directly

Verify each nameserver responds:

dig @ns1.yourdomain.com yourdomain.com A
dig @ns2.yourdomain.com yourdomain.com A

Both should return the same A record for your domain.

Test 3: Verify A Records for Nameservers

Check that A records resolve correctly:

dig ns1.yourdomain.com A
dig ns2.yourdomain.com A

IPs should match your glue records.

Test 4: Check Propagation

Use multiple DNS checking tools:

Online tools:

  • whatsmydns.net
  • dnschecker.org
  • MXToolbox DNS lookup

Command line:

# Query from Google's DNS
dig @8.8.8.8 yourdomain.com NS

# Query from Cloudflare's DNS
dig @1.1.1.1 yourdomain.com NS

Test 5: Verify WHOIS Shows New Nameservers

Use DomainDetails or WHOIS lookup to confirm:

  • Nameservers show as ns1.yourdomain.com, ns2.yourdomain.com
  • Glue records appear correctly

Troubleshooting Common Issues

DNS Lookups Fail After Setup

Symptoms: Website unreachable, DNS resolution errors

Common causes:

  1. Glue records not created: Verify at registrar
  2. IP mismatch: Compare glue record IPs to A record IPs
  3. Propagation incomplete: Wait 48 hours
  4. DNS server not responding: Check server status/configuration

Diagnostic steps:

# Check if glue records exist
dig +trace yourdomain.com NS

# Query nameserver directly
dig @[nameserver-ip] yourdomain.com A

Inconsistent DNS Responses

Symptoms: Sometimes works, sometimes doesn't

Causes:

  • Different IPs in glue vs. A records
  • One nameserver configured incorrectly
  • Caching of old records

Fix: Ensure all configurations match exactly across glue records, A records, and NS records.

"SERVFAIL" or "REFUSED" Responses

Symptoms: DNS queries return errors

Causes:

  • DNS server not configured to answer for your domain
  • Firewall blocking DNS queries (port 53)
  • DNS server not running

Fix: Verify DNS server configuration and accessibility.

Changes Not Taking Effect

Symptoms: Old nameservers still showing

Causes:

  • TTL caching (wait for old TTL to expire)
  • Registrar processing delay
  • Changes not saved properly

Fix:

  • Verify changes saved at registrar
  • Wait 48-72 hours for full propagation
  • Lower TTL values before future changes

Maintenance and Best Practices

Ongoing Maintenance Tasks

Monthly:

  • Verify DNS servers are responding
  • Check monitoring alerts

Quarterly:

  • Test failover between nameservers
  • Review server logs for errors
  • Verify IP addresses haven't changed

Annually:

  • Review nameserver infrastructure
  • Update IPs if infrastructure changes
  • Audit DNS configuration

IP Address Changes

If you need to change nameserver IP addresses:

  1. Plan carefully: Changes can cause downtime
  2. Lower TTL first: Reduce TTL 24-48 hours before change
  3. Update in order:
    • Update A records in DNS zone
    • Update glue records at registrar
    • Wait for propagation
  4. Verify resolution from multiple locations
  5. Restore normal TTL after successful migration

Warning: Incorrect IP changes can make your domain unreachable for up to 48 hours.

Backup Considerations

Always maintain:

  • Documentation of all IPs and configurations
  • Ability to revert to standard nameservers
  • Access to both registrar and DNS provider
  • Contact information for DNS provider support

Security Considerations

Protect your nameservers:

  • Keep DNS server software updated
  • Implement rate limiting against DDoS
  • Monitor for unusual query patterns
  • Use DNSSEC if possible
  • Restrict zone transfers

Cloudflare Custom Nameservers

Cloudflare's custom nameserver options deserve special attention.

Types of Custom Nameservers at Cloudflare

Account Custom Nameservers (ACNS):

  • Apply across all zones in account
  • Available on Business (contact support) and Enterprise
  • Single set of vanity NS for entire account

Zone Custom Nameservers (ZCNS):

  • Per-zone custom nameservers
  • Available on Business and Enterprise
  • Each zone can have different custom NS

Setting Up Cloudflare ACNS

Requirements:

  • Business or Enterprise plan
  • Domain for NS names in same account OR ability to add A records elsewhere

Process:

  1. Configure in dashboard:

    • Account Settings → DNS Settings
    • Configure custom nameservers
    • Add nameserver hostnames
    • Cloudflare provides IP addresses
  2. Add glue records:

    • If NS domain is at Cloudflare Registrar: Contact support
    • If NS domain elsewhere: Add glue records at that registrar
  3. Apply to zones:

    • Go to zone DNS settings
    • Select custom nameservers to use

Enterprise Features

Enterprise customers get additional options:

  • Use own IP prefixes for nameservers
  • Cross-account custom nameserver sharing
  • Advanced DNS defaults configuration

Frequently Asked Questions

Do I need custom nameservers for my website?

No, most websites don't need custom nameservers. Standard nameservers work perfectly fine. Custom nameservers are primarily valuable for branding (hosting companies, agencies) or technical independence (ability to switch DNS providers without visible changes).

Can I use CNAME records instead of A records for nameservers?

No, CNAME records cannot be used for nameservers. NS records must point to hostnames that have A (or AAAA) records, not CNAMEs. Additionally, you cannot register glue records with CNAME targets—only IP addresses are accepted.

How many custom nameservers do I need?

Minimum 2, recommended 2-4. The DNS specification requires at least two nameservers for redundancy. Some organizations use more for additional fault tolerance, but 2 is sufficient for most use cases.

Will custom nameservers improve my SEO?

No measurable SEO benefit. Search engines don't favor custom nameservers over standard ones. The only potential benefit is brand consistency, which has no direct SEO impact.

Can I use custom nameservers with free DNS providers?

Usually not. Most free DNS services (including free registrar DNS) don't support vanity nameservers. You typically need premium DNS services or your own DNS servers.

What happens if I change my DNS provider?

This is a key benefit of custom nameservers. Since your domain uses ns1.yourdomain.com, you can change the underlying IP addresses (by updating glue records and A records) without changing the visible nameservers. Users and DNS caches see the same nameserver names throughout the migration.

How long does custom nameserver setup take?

24-48 hours for full propagation. Creating glue records is instant at the registrar level, but propagation through the global DNS system takes time. Your domain may work intermittently during this period.

Can I have multiple domains use the same custom nameservers?

Yes, absolutely. Once you have custom nameservers set up for yourdomain.com, you can point other domains (anotherdomain.com, thirddomain.com) to use ns1.yourdomain.com and ns2.yourdomain.com. These other domains don't need glue records since the nameserver hostnames aren't under their domain.

What if my glue record IP changes?

Update both the glue records and A records. Changes must be synchronized. It's best to lower TTL values before making changes, then update in this order: A records first, then glue records. Allow time for propagation before verifying.

Key Takeaways

  • Custom nameservers replace generic provider names (ns1.provider.com) with branded names (ns1.yourdomain.com)
  • Glue records are essential—they break the circular DNS dependency by storing nameserver IPs at the TLD level
  • Three record types required: Glue records at registrar, A records in DNS zone, NS records pointing to your nameservers
  • IP consistency is critical: Glue record IPs and A record IPs must match exactly
  • Not for everyone: Custom NS adds complexity that benefits hosting providers and enterprises more than typical website owners
  • Allow 48 hours for propagation after setup before troubleshooting

Next Steps

Before You Start

  1. Evaluate necessity: Do you actually need custom nameservers?
  2. Verify provider support: Confirm your DNS provider supports vanity NS
  3. Get IP addresses: Obtain nameserver IPs from your provider
  4. Plan nameserver names: Choose professional, consistent hostnames

Setup Process

  1. Create glue records: Add at your domain registrar
  2. Configure DNS zone: Add A records and NS records
  3. Update nameservers: Point domain to custom NS
  4. Wait for propagation: Allow 48 hours minimum

After Setup

  1. Verify with dig: Test that all records resolve correctly
  2. Document configuration: Record all IPs and settings
  3. Set up monitoring: Alert on DNS failures
  4. Plan for changes: Know the process for IP updates

Research Sources

Information in this article was compiled from:

  • NameSilo vanity nameservers documentation
  • Cloudflare custom nameservers documentation
  • Porkbun glue records knowledge base
  • AWS Route 53 developer documentation
  • NinjaOne vanity nameserver guide
  • Gandi vanity nameserver documentation
  • ClouDNS DNS branding documentation
  • Vultr vanity DNS setup guide
  • RFC 1912 (DNS operational guidelines)
  • ICANN technical documentation on DNS