Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

How many nameserver entries can I give in /etc/resolv.conf ? I have given our ISP's 2 nameserver entries as first and second. But since they have issues sometimes, I would like to add Google public nameserver enry. Does a 3rd & 4th entry make any difference ?

This is the resolve.conf on our proxy(squid) server. I understand that Squid uses /etc/resolv.conf for name resolution.

share|improve this question
up vote 5 down vote accepted

Actually, you're only allowed three server entries in /etc/resol.conf.


share|improve this answer

You can effectively have as many namservers as you want. Just remember that resolution will fail on the first before going to the second, and so on. It will be some time before name resolution attempts make it to the third and fourth nameservers.

share|improve this answer
It's set by MAXNS in resolv.conf, which is normally 3. – Sirex Dec 24 '10 at 9:14
Oooh, good catch. Thanks! – Jeff McJunkin Jan 4 '11 at 18:31

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.