Initech
KB-18 Print

Reverse DNS (PTR) and Custom Nameservers on Your VPS

Quick answer: reverse DNS (PTR) maps your server IP back to a hostname and matters most for sending email; on our platform a PTR change is arranged per provider line through a support ticket. Custom nameservers (like ns1.yourdomain.com) are a separate job done at your domain registrar with glue records, pointing at a DNS server you run or a managed DNS service. The two are unrelated, so this guide covers them separately.

Part 1: Reverse DNS (PTR records)

What reverse DNS is

Forward DNS turns a name into an IP. Reverse DNS does the opposite: it turns an IP back into a name, using a special PTR record. If forward DNS says mail.example.com points to 203.0.113.45, a matching PTR record says 203.0.113.45 points back to mail.example.com.

Why it matters

Reverse DNS is checked most often by mail servers. Many receiving servers reject or distrust mail from an IP that has no PTR record, or whose PTR does not line up with the sending hostname and its forward record. If you plan to send email from your VPS, a correct PTR that matches your mail hostname is close to mandatory for deliverability. For most other services it is optional but tidy.

How to set it

A PTR record lives with whoever controls the IP address block, which is the hosting provider, not your domain registrar. You cannot set it in your domain zone. Note also that changing the operating system hostname with hostnamectl does not change reverse DNS; the two are independent.

On our platform, reverse DNS changes are handled per provider line through a support ticket. Open a ticket with the IP address and the exact hostname you want it to resolve to, and we will arrange it for your specific service. Set the matching forward record (an A record for that hostname pointing at the same IP) in your own DNS so that forward and reverse agree.

Part 2: Custom nameservers

What custom nameservers are

Custom or vanity nameservers let your domain answer DNS from names under your own domain, such as ns1.yourdomain.com and ns2.yourdomain.com, instead of a provider's generic nameservers. They are common for anyone running their own authoritative DNS or reselling hosting who wants their brand on the nameservers.

Register glue records at the registrar

Because ns1.yourdomain.com is itself inside the domain it serves, DNS needs a hint to break the loop. That hint is a glue record: at your domain registrar you register each nameserver hostname and attach its IP address. This is sometimes called registering a host or a child nameserver.

  • In the registrar control panel, find the option to register or manage nameservers or hosts for your domain.
  • Create ns1.yourdomain.com with your VPS IPv4 (and IPv6 if you have one), then ns2.yourdomain.com with a second IP for redundancy.
  • Then set the domain itself to use those two nameservers.

Glue changes propagate through the registry and can take time to appear everywhere.

Run your own authoritative DNS

The nameserver hostnames need something to answer them: an authoritative DNS server running on the IPs you registered. Common choices are BIND9 and PowerDNS, both widely available in the standard repositories. You configure a zone for your domain, add the records you want, and open UDP and TCP port 53 in your firewall so queries reach the server. Running two separate machines, or at least two IPs, is strongly recommended so a single failure does not take your whole domain offline.

The tradeoffs

Running your own nameservers gives you full control and puts your brand on the DNS, but you own the uptime, security and correctness of that DNS. If the server goes down or the zone has an error, every service on the domain can become unreachable. A managed DNS service, by contrast, gives you an anycast network with high uptime and no server to maintain, at the cost of the vanity names and full control. For most people managed DNS is the simpler and more reliable choice; custom nameservers make sense when you specifically need the branding or the control.

A quick decision guide

  • You only need records for one domain and want reliability: use a managed DNS provider, no custom nameservers required.
  • You resell hosting or want your own branded nameservers: register glue records and run BIND9 or PowerDNS on at least two IPs.
  • You send email and want good deliverability: that is the reverse DNS job in Part 1, handled through a support ticket, and is independent of whether you use custom nameservers.

If you are unsure which path fits your setup, open a support ticket and describe what you are trying to run.

Was this answer helpful?
Related Articles