How to set up your server's nameservers (ns1 and ns2)

For server administrators · Updated 2026-10-29

On this page
  1. Before you start
  2. Step 1: set the names in the panel
  3. Step 2: create the address records
  4. Step 3: register glue records at the registrar
  5. Good to know
  6. Common questions

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

  1. Log in to the administrator panel (https://your-server:2087).
  2. Open Server Settings (section Server).
  3. Under DNS & SSL, enter Nameserver 1 (ns1.example.net) and Nameserver 2 (ns2.example.net).
  4. 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:

HostIP address
ns1.example.net203.0.113.10
ns2.example.net203.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 NS records 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.

Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.