🧷
Domains

Creating your own nameservers (ns1.yourdomain.uz): glue records explained

15.11.2026
← All articles

Most domain owners simply use the nameservers their hosting provider gives them, and that is a perfectly good choice. Sometimes, though, a company wants nameservers inside its own domain, such as ns1.yourdomain.uz and ns2.yourdomain.uz. This is common for web studios that offer hosting and DNS under their own brand, organisations running their own servers, and technical teams that want full control of DNS. The trickiest part of this setup is glue records: without them the domain will not resolve at all.

Why a plain NS record is not enough

Say you set ns1.sizningdomen.uz as the nameserver for sizningdomen.uz. A resolver looking up your site first asks the .uz zone and learns that the domain's nameserver is ns1.sizningdomen.uz. Now it needs the IP address of ns1, and to get it, it would have to query the sizningdomen.uz zone, which is exactly the server it cannot find yet. That is a circular dependency: you need the nameserver to find the domain and the domain to find the nameserver.

A glue record breaks the loop. It is an extra A record (and AAAA if needed) stored in the parent zone, the .uz registry, that contains the IP address of ns1.sizningdomen.uz directly. When the .uz server answers with your NS records, it includes this IP in the ADDITIONAL section, so the resolver can contact your server straight away. Glue is only needed when the nameserver name sits inside the domain itself; nameservers in another domain, such as a provider's, need no glue.

What to prepare first

Your own nameserver is a service that must stay up, not just a nice name. If both nameservers go down, the website, email and every other service on the domain disappear from the internet. Before you start, make sure you have:

Example: a web studio sets up its nameservers

A small Tashkent web studio builds sites for dozens of clients and wants to give them branded nameservers. It has two servers, 203.0.113.10 and 198.51.100.20 (documentation addresses here; use your own). The order matters: configure the zone on the servers, create the glue at the registrar, and only then switch the domain's NS records.

Step 1: the zone file

The zone must contain A records for the nameservers themselves, and those IPs must match the glue exactly:

$TTL 3600
@       IN SOA  ns1.sizningdomen.uz. admin.sizningdomen.uz. (
                2026110401 ; serial
                3600       ; refresh
                900        ; retry
                1209600    ; expire
                300 )      ; minimum
        IN NS   ns1.sizningdomen.uz.
        IN NS   ns2.sizningdomen.uz.
ns1     IN A    203.0.113.10
ns2     IN A    198.51.100.20
@       IN A    203.0.113.10
www     IN CNAME sizningdomen.uz.

Add the zone to BIND, allow the second server to transfer it, and disable recursion on the authoritative server so it cannot be abused:

options {
    recursion no;
};

zone "sizningdomen.uz" {
    type master;
    file "/etc/bind/db.sizningdomen.uz";
    allow-transfer { 198.51.100.20; };
    also-notify { 198.51.100.20; };
};

On the second server declare the same zone as type slave; (type secondary; in newer BIND) with masters { 203.0.113.10; };. Check and reload:

named-checkconf
named-checkzone sizningdomen.uz /etc/bind/db.sizningdomen.uz
sudo rndc reload

Steps 2 and 3: glue, then NS

At the registrar, create the child nameservers ns1.sizningdomen.uz and ns2.sizningdomen.uz with their IPs. Some panels have a dedicated section for this; elsewhere support does it for you. In the sayt.uz cabinet you simply enter a nameserver under your own domain in the NS section: a field for its IP address appears and the glue record is created right there. These host records go to the .uz registry and act as glue. Only after that should you change the domain's nameservers to the new names. Some registries also check that the servers actually answer for the domain before accepting the delegation.

Verifying with dig

Find the .uz servers, query one of them directly without recursion, and look for your NS records in AUTHORITY and the glue IPs in ADDITIONAL:

dig NS uz. +short
dig @<uz-server-name> sizningdomen.uz NS +norec

dig @203.0.113.10 sizningdomen.uz SOA +norec
dig +trace sizningdomen.uz

The third command should show the aa flag, meaning the server answers authoritatively. Repeat it against the second server and compare the SOA serials; a mismatch means the zone transfer has not happened.

Common mistakes

The most frequent problem is a glue IP that differs from the A record in the zone, which makes resolvers behave inconsistently and is hard to debug. When a server's IP changes, update both places. Forgetting to bump the serial leaves the secondary serving stale data. And letting the domain that hosts the nameservers expire takes down every other domain that uses them, so renew it for a long term and enable auto-renewal.

For a single site or a small business, running your own nameservers is usually unnecessary complexity. sayt.uz customers, for example, manage DNS records through the cabinet without operating any DNS servers themselves. Own nameservers make sense for teams serving many clients with their own infrastructure and someone to monitor it.

Related articles

🕶️ WHOIS Privacy: How to Hide Domain Owner Details 🎣 Lookalike phishing domains: how to monitor and protect your brand 🛒 How to Connect Your Own Domain to a Shopify Store: A and CNAME Records Explained 💎 Why premium domain renewals are expensive and what to check before you buy
🌐 Language
🇺🇿 O'zbek 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓