How private nameservers work
When someone visits clientsite.in, resolvers ask the .in registry which nameservers are responsible. If the answer is ns1.example.com, there is a chicken-and-egg problem: to find ns1.example.com you would need to ask example.com's nameservers, which are ns1.example.com. Glue records break the loop. They are IP addresses for ns1 and ns2 that the registry for example.com publishes directly, so resolvers can reach your DNS server without first resolving its name.
| Piece | Where it lives | What it says |
|---|---|---|
| Glue (child nameserver) records | Registrar of example.com | ns1.example.com = 203.0.113.10, ns2.example.com = 203.0.113.11 |
| Nameserver delegation | Registrar of each client domain | clientsite.in uses ns1.example.com and ns2.example.com |
| Zone files | Your DNS server | The actual A, MX, TXT and other records for each domain |

One server or two? The redundancy question
Registrars require at least two nameservers, and the reason is resilience: if one fails, the other keeps answering. The Internet standard on this, RFC 2182, recommends placing secondary DNS servers on different networks.
Many people put both ns1 and ns2 on two IP addresses of the same dedicated server. It works, and it satisfies the registrar, but if that server goes down, every domain it serves stops resolving, including email. Better options, in order:
- Two servers in different data centers, for example one in Mumbai and one in Delhi, with zones synchronised.
- Your server as primary plus a secondary DNS service that copies your zones by zone transfer.
- Two IPs on one server: acceptable for testing or small setups, with good monitoring.
Extra IPv4 addresses for this purpose are available on SkyRain Cloud dedicated servers; our guide to dedicated IP addresses explains how they are used.
Step 1: Register the glue records
Log in to the registrar where your own domain (example.com) is registered. Look for a section called Child Nameservers, Register Nameservers, Host Records or Glue Records. Create:
ns1.example.com→ your first IPns2.example.com→ your second IP
Registry updates can take from minutes to a day to appear everywhere.
Step 2: Run an authoritative DNS server
With cPanel/WHM or Plesk
Control panels include a DNS server. In WHM, set the nameserver names under Basic WebHost Manager Setup, add A records for ns1 and ns2, and every new account's zone will use them. Plesk has an equivalent DNS template. If you have not installed a panel yet, see our cPanel installation guide.
With BIND on Ubuntu or Debian
sudo apt install bind9 bind9-utils
In /etc/bind/named.conf.options, make the server authoritative only:
options {
directory "/var/cache/bind";
recursion no;
allow-transfer { none; };
listen-on { any; };
};
Declare your own zone in /etc/bind/named.conf.local:
zone "example.com" {
type master;
file "/etc/bind/zones/db.example.com";
};
Create the zone file /etc/bind/zones/db.example.com:
$TTL 3600
@ IN SOA ns1.example.com. admin.example.com. (
2026112301 ; serial (date + number)
3600 ; refresh
900 ; retry
1209600 ; expire
300 ) ; negative cache TTL
IN NS ns1.example.com.
IN NS ns2.example.com.
ns1 IN A 203.0.113.10
ns2 IN A 203.0.113.11
@ IN A 203.0.113.10
www IN A 203.0.113.10
Check and load it:
sudo named-checkconf
sudo named-checkzone example.com /etc/bind/zones/db.example.com
sudo systemctl reload named
Add a zone like this for each client domain. Increase the serial every time you edit a zone, or secondary servers will not pick up the change.
Step 3: Open port 53 and keep recursion off
DNS uses UDP port 53 for most queries and TCP port 53 for large responses and zone transfers. With UFW:
sudo ufw allow 53/udp
sudo ufw allow 53/tcp
The recursion no; setting above is important. An authoritative server that also answers recursive queries for anyone is an open resolver, which attackers abuse to amplify DDoS attacks against third parties. It can also get your IP addresses blocklisted. For the rest of your firewall, see our dedicated server firewall guide.
Step 4: Test before you move clients
dig @203.0.113.10 example.com SOA +short
dig @203.0.113.11 www.example.com A +short
dig ns1.example.com A +short
dig example.com NS +trace
The first two ask your servers directly. The third checks that the glue records are visible. The last follows delegation from the root servers down to yours, showing exactly where a problem sits. Then, for each client domain, change its nameservers at its registrar to ns1/ns2 and test the same way.
Common mistakes
- Glue records with the wrong IP, or created at the client's registrar instead of yours.
- Forgetting the A records for ns1 and ns2 inside your own zone.
- Port 53 open on UDP only: large answers then fail intermittently.
- Not increasing the zone serial after edits.
- Both nameservers on one server with no monitoring. If you do this, watch it closely; see our guide for agencies on planning for growth.
Why businesses choose SkyRain Cloud dedicated servers
Running your own DNS works best on stable, well-connected hardware. SkyRain Cloud dedicated servers offer:
- Indian data centers, Indian latency. Intel Xeon dedicated servers are hosted in Mumbai and Delhi, close to customers across India.
- The whole machine is yours. 100% unshared hardware: no other tenants competing for CPU, memory or disk.
- DDoS protection included on the network, so a flood aimed at your IP does not have to become your problem alone.
- Full control. Root or Administrator access plus iLO/IPMI out-of-band management to reboot, reinstall or mount your own ISO.
- Real support channels. 24/7 support tickets, WhatsApp and a Discord community, plus a public status page.
- Simple billing. Monthly billing in rupees with UPI, net banking and cards.
Frequently Asked Questions
What are private nameservers?
What is a glue record?
Do I need two IP addresses for private nameservers?
How long do private nameservers take to work?
Which ports does a DNS server need?
What is an open resolver and why avoid it?
Conclusion
Private nameservers put your brand on every client domain and make moving clients between servers painless. The setup is glue records at your registrar, an authoritative DNS server with recursion disabled, port 53 open on both UDP and TCP, and careful testing with dig. Treat redundancy seriously: two servers or a secondary DNS service turns a single point of failure into a resilient service.
To run DNS, hosting and email on your own hardware, see our dedicated servers.
SkyRain Cloud Dedicated Server Plans
Unshared Intel Xeon bare-metal servers in Mumbai and Delhi data centers with 1 Gbps connectivity. Every plan includes iLO / IPMI out-of-band management, DDoS protection, Full root / Administrator access, Additional IPv4 addresses available and Billed monthly.
| Plan | Cores / Threads | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| Business 2× Intel Xeon E5-2699 v4 (Mumbai / Delhi) | 44 / 88 (2.2 GHz base, 3.6 GHz turbo) | 128 GB DDR4 ECC | 1 TB NVMe SSD | 1 Gbps | ₹17,999/month | Business websites, stores, databases, ERP and many client sites | Order |
| Enterprise 2× Intel Xeon Platinum 8269CY (Mumbai / Delhi) | 52 / 104 (2.5 GHz base, 3.8 GHz turbo) | 128 GB DDR4 ECC | 1 TB NVMe SSD | 1 Gbps | ₹19,999/month | Virtualization hosts, large databases, SaaS and container platforms | Order |
| Custom | More RAM or storage, a second server for failover, or several servers for a cluster: quoted by the team. | Clusters, failover pairs, unusual specs | Ask | ||||
Prices are monthly in INR as listed on the SkyRain Cloud store (verified 2026-11-23). Live stock and final price are shown at checkout.