The resolv.conf file is the resolver configuration file. It is use to configure client side access to the Internet Domain Name System (DNS). This file defines which name servers to use.
The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information
Note: File name is /etc/resolv.conf and not /etc/resolve.conf.
Sample resolv.conf file
Following is an example of resolv.conf file:
search cyberciti.biz
nameserver 202.54.1.10
nameserver 202.54.1.11
Where,
- search domain.com: The search list is normally determined from the local domain name; by default, it contains only the local domain name. So when you type nslookup www, it will be matched to www.cyberciti.biz
- nameserver Name-server-IP-address: Point out to your your own nameserver or to ISP’s name server. Up to 3 name servers may be listed.
But how do I edit the /etc/resolv.conf file?
Use text editor such as vi or gedit from Linux desktop:
# vi /etc/resolv.conf
Default /etc/resolv.conf file
Following file should be work with any ISP in the world :)
# cat /etc/resolv.conf
Output:
nameserver 208.67.220.220 nameserver 208.67.222.222
For more information see How to Setup Linux as DNS client.
Yes it is the basic file and lots of guys donT understand how to and whats it for.
Then they complaint for the slow internet speed:
humm
pushkar bhtkoti
CCNA/CCNP/CCDP/CCSP/MCSE
sydney
i want to know the secret dns server address
aravind, if you want to find out address of your DNS server then read this http://www.cyberciti.biz/faqs/2006/01/how-to-find-out-what-my-dns-servers.php
thanx i resolve my problem
Hi everyone
And now who I know if it’s working ?
hi,
what is the use of adding domain in /etc/resolv.conf ?
thanx i resolve my problem
thanx i resolve my problem
Hello. i want learn how to configure DNS server in Linux. But i didn’t clearly understand the topic resolve.conf. the problem am facing is that if am establishing a (DNS)server say http://www.xyz.com ..what should i do?? can i put this on resolve.conf file like
serach http://www.xyz.com
nameserver 192.168.1.1
please help me my email address is [email protected]
once you have the nameserver in your /etc/resolv.conf …then you can run #host name ..to check
i.e
#hostname prod_servername
nameserver 208.67.220.220
nameserver 208.67.222.222
do you means nameserver is my domain name?
is this correct example :
http://www.mydomain.com 208.67.220.220
http://www.mydomain.com 208.67.222.222
is this working if I make file in directory /etc/resolv.conf in shared webhosting??
sory for my english. :( :)
i realy need your help :(
vikha: nameserver is a keyword you have to write it as is, so in your resolv.conf file:
nameserver 208.67.220.220
nameserver 208.67.222.222
Hope this help.
Guys,
Is it possible to provide diferrent DNS servers in resolv.conf for different domains?
so abc.com –> gets resolved by DNS1 and xyz.com gets resolved by DNS2 ?
ALL is well
I keep wondering: I have seen things like this in resolv.conf:
search server_ name
instead of:
search domain_name
And I know both of them work so which one is better? Thanks a lot !!!
Good reference for resolv.conf
Setup as DNS Client / Name Server IP Address –
http://www.cyberciti.biz/tips/linux-how-to-setup-as-dns-client.html
Why would someone put ‘nameserver 8.8.8.8’ instead of their global IP?