How to set up your server's nameservers (ns1 and ns2)
On this page
Your customers point their domains to two nameserver names, for example ns1.example.net and ns2.example.net. For those names to work, three things are needed: the names in the panel, address (A) records for them, and child nameservers (glue records) at the registrar of example.net.
Before you start
- You need a domain you control for the names, usually the domain of the server's hostname.
- You need the server's IP address (shown in Server Settings as Shared IP address), for example
203.0.113.10.
Step 1: set the names in the panel
- Log in to the administrator panel (
https://your-server:2087). - Open Server Settings (section Server).
- Under DNS & SSL, enter Nameserver 1 (
ns1.example.net) and Nameserver 2 (ns2.example.net). - Click Save settings.
The installer sets these names already; change them only if you want other names.
Step 2: create the address records
If example.net is a zone on this server, open DNS Zones, click Edit next to example.net and make sure there are A records for ns1 and ns2 pointing to 203.0.113.10. Add them if they are missing.
Or let the server create them: connect as root over SSH and run
sahaab dns:nameservers
It adds the A records for ns1, ns2 and the hostname. If example.net uses another DNS provider, it prints the records to add there instead.
Step 3: register glue records at the registrar
At the registrar of example.net, find child nameservers, host names or glue records and create:
| Host | IP address |
|---|---|
ns1.example.net | 203.0.113.10 |
ns2.example.net | 203.0.113.10 |
Then set the nameservers of example.net itself to ns1.example.net and ns2.example.net.
Good to know
- Both names may point to the same IP address. To put the second nameserver on another server, use a DNS cluster.
- New zones use the nameservers from Server Settings. Changing them later does not update the
NSrecords of existing zones; edit those in DNS Zones. - Resellers can have their own nameserver names; see reseller nameservers.
- Glue records take from a few minutes to 48 hours to appear, depending on the registry.
Common questions
How can I check that the nameservers answer?
From any computer, run dig @203.0.113.10 example.net SOA. An answer with your nameserver name means the server answers for the zone.
Customers see the server's nameservers on their Home page. Where does that come from?
From Nameserver 1 and Nameserver 2 in Server Settings.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- How to set up private nameservers for a reseller
Give a reseller branded nameservers such as ns1.their-brand.com, register glue records, and apply the new nameservers to existing customer zones.
- How to set up a DNS cluster (secondary DNS on another server)
Let a second server copy and answer for this server's DNS zones, so your nameservers sit on different machines and keep answering if one is down.
- How to point a domain to your hosting (nameservers or A record)
Connect a domain to your hosting by changing its nameservers at the registrar, or by adding an A record at another DNS provider, and check it.
- How to edit any DNS zone as administrator or reseller
Find, open and edit the DNS zones of customer accounts from the DNS Zones page of the administrator panel, as the server administrator or a reseller.