# Create custom nameservers
Source: https://docs.webgee.com/en/domains-dns/how-do-i-create-custom-nameservers



Run nameservers on your own domain — `ns1.example.com` and `ns2.example.com` —
so your reseller clients point their domains at your brand rather than WebGee's.
Applies to reseller accounts. There is no charge.

<Callout type="warn">
  Every step must be completed. Custom nameservers that are partly configured
  fail in the worst possible way: sites load for you and for some visitors, and
  fail for others depending on which resolver they use. That is far harder to
  diagnose than a clean failure.
</Callout>

## What you need [#what-you-need]

* A domain you control, to host the nameservers on.
* **Two IP addresses** from your welcome email, or from the client area.

## 1. Register glue records at your registrar [#1-register-glue-records-at-your-registrar]

This is the step people miss, and nothing works without it.

A glue record tells the registry the IP address of a nameserver that lives
*inside* the domain it serves. Without it, resolvers are asked to look up
`ns1.example.com` by asking `ns1.example.com` — a loop they cannot escape.

At your registrar, find the option to register a **hostname**, **child
nameserver** or **glue record** — the terminology differs, but every registrar
has it — and create:

| Hostname          | IP address                |
| ----------------- | ------------------------- |
| `ns1.example.com` | Your first nameserver IP  |
| `ns2.example.com` | Your second nameserver IP |

## 2. Add matching A records [#2-add-matching-a-records]

In the DNS zone for `example.com`, add:

| Name  | Type | Value                     |
| ----- | ---- | ------------------------- |
| `ns1` | `A`  | Your first nameserver IP  |
| `ns2` | `A`  | Your second nameserver IP |

The glue records and these `A` records must agree. Where they disagree,
behaviour varies by resolver — which is exactly the partial failure described
above.

## 3. Set them in WHM [#3-set-them-in-whm]

1. Sign in to **WHM**.
2. Search for **Basic WebHost Manager Setup**.
3. Under **Nameservers**, enter `ns1.example.com` and `ns2.example.com`.
4. Save.

New accounts you create are assigned these nameservers automatically.

## 4. Point your own domain at them [#4-point-your-own-domain-at-them]

Change `example.com` itself to use `ns1.example.com` and `ns2.example.com` at
your registrar.

## Check it worked [#check-it-worked]

```bash
dig +short ns1.example.com
dig +short ns2.example.com
```

Both must return the correct IPs. Then confirm the delegation resolves:

```bash
dig +short NS example.com
dig @ns1.example.com +short example.com
```

The second queries your nameserver directly — a valid answer means it is
authoritative and serving.

Allow up to 48 hours before concluding anything is wrong. Glue record changes
propagate at registry level and are slower than ordinary DNS.

## If sites load intermittently [#if-sites-load-intermittently]

That is the signature of missing or mismatched glue records. Re-check step 1 —
some resolvers hold the correct answer from another path while others follow the
loop and fail.

## Related [#related]

* [Which nameservers to use](/en/domains-dns/which-nameservers-should-i-use-with-webgee)
* [Change the SOA record](/en/domains-dns/how-do-i-update-the-soa-record-of-the-dns-zones-under-my-reseller-account)
* [Set up custom DNS zone templates in WHM](/en/reseller/setting-up-custom-dns-zone-templates-in-whm)
