Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it better (for efficiency) to use an IP address when setting a custom name server for my domain name rather than a domain like

share|improve this question
I can't figure out how this question could make sense. In what case do you have to choose between using a domain name or using an IP address? – David Schwartz Mar 13 '12 at 2:28
This question is very vague; use IP address where? In general, using an IP address is best for daemons and servers in general. – Mei Mar 13 '12 at 2:29
Apologies for the vagueness--my understanding of how this works is limited. I have a domain registered with a company other than where my web site is being hosted, and thus need to point the domain to my web host. – devios Mar 13 '12 at 2:40
up vote 5 down vote accepted

When you specify a name server, you need to provide an NS record. NS records always point to a name. See Can the value for a NS record be an IP address?

$ host -t NS name server name server name server name server

Whatever hosts you list as your name servers must also resolve to an IP.

$ host has address

Thus, if you're using an interface that is asking you to enter a name server's address, enter a DNS name.

Also, don't sweat the round-trip-time to find that A record -- the referring server also keeps the A record as "glue". That's why you usually also have to enter the IP address. When looking up the NS record, we get that additional data as well. With my registrar, I must first define a nameserver's name and IP combination before I can register the nameserver to the domain.

$ dig

; <<>> DiG 9.7.3-P3 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30818
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;           IN      A

;; AUTHORITY SECTION:    172800  IN      NS    172800  IN      NS    172800  IN      NS

;; ADDITIONAL SECTION:        172800  IN      A        172800  IN      A        172800  IN      A

;; Query time: 151 msec
;; WHEN: Mon Mar 12 22:37:41 2012
;; MSG SIZE  rcvd: 135
share|improve this answer
I could have sworn I've been able to add IP addresses into the name server settings for a domain before. Oddly enough my registrar has two apparent ways to set this: one under "name servers" and the other under NS record of DNS. How are these different? – devios Mar 13 '12 at 2:37
@chaiguy Gave you some updates on glue records... it is very likely that you did have to add addresses when specifying name servers. – Jeff Ferland Mar 13 '12 at 2:43
I think I get it, cheers :) – devios Mar 13 '12 at 2:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.