0

I have a virtual private server(VPS) with some IP address like http://111.222.333.444/, and wanted to publish my Angular-NodeJS project on it, so I tried to buy a domain for my website from another provider than my VPS srvice, but in the form of domain submission it asks for NameServer1, Nameserver@?

I don't know how should I fill these fields? Should I do something like the following?

ns1.111.222.333.444
ns2.111.222.333.444

I also like to know what are thise ns1, ns2?

1 Answer 1

3

DNS domains have nameservers for the same purpose as websites have webservers – to store the domain information and respond to clients' DNS queries.

Specifically, the nameservers store a table of DNS "records" which map the domain to an IP address, or specify where to deliver email, etc. – and the same for all of its subdomains. (It might be an actual SQL database table or it might be a text file.)

Nameservers themselves are also identified by their domain names (never directly by IP addresses), and "ns" is a common convention for that – so a domain like "example.com" might usually call its nameservers "ns1.example.com" and "ns2.example.com". Nothing prevents one from using different names though.


I don't know how should I fill these fields?

First check whether your domain registrar offers free nameserver hosting as part of your purchase (many do). In that case you're supposed to either fill in the nameserver addresses provided by the registrar, or there's a separate button for activating this feature. Once that's done, you just manage all IP addresses and subdomains through the same website. (For example, if you're buying the domain through Namecheap, you're supposed to select "Basic DNS" to activate their provided nameservers.)

Alternatively, many VPS providers also offer nameserver hosting – often it's a free add-on as long as you have at least one server with them. (The domain doesn't actually need to point to that server.) For example, if your VPS is at Digital Ocean or Linode, you can just use their DNS service as well. In that case the provider's documentation will have a page listing the correct nameservers, like this or this.

Finally, you can host the nameserver on your own VPS using standard software (such as BIND, Knot, PowerDNS, or NSD). If you do this, then you decide what subdomain to give to the nameserver – the usual tradition is "ns1.yourdomain.com" – and the registrar needs to allow you to enter both the name and the server's IP address side by side. (This might be labelled "glue record".)

Note that you can always switch nameservers from one provider to another – as long as you're the domain's owner, it's a matter of updating the two fields on your registrar's webpage.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .