resolv.conffile is used by Linux to resolve DNS lookup but I cant figure if I need to edit this file in my case.
I am not hosting the DNS on my vps machine. I have purchase Godaddy Premium DNS Service to set my A Records, mx etc.. My vps is only used to host 1 website where Nginx handles all incoming requests.
1) In my case where I am using Godaddy DNS service, do I still need to add the Nameserver resolution in
resolv.conffile? Or does resolv.conf only applies if I am hosting my own DNS on my machine using BIND or something else?
2) The current resolv.conf file looks like this. In the ip address, does it mean I have to enter the Godaddy Nameserver’s ip address here?
nameserver 123.00.00.123 <-- Is this Godaddy NS Ip address?
3) Which services uses this resolv.conf? I mean does Nginx, Postfix or ssh refer to the configuration in this file at all?
I’ve set everything else up and only now I came across
resolv.confby accident and I dont know if my set-up is incomplete without this info. Can someone help me understand this please?
Every system needs to configure it’s resolver, regardless if it’s a DNS server or not. This is used by the core library of the OS which will be used whenever any service needs to resolve a name – they just use library function for it which uses this configuration (there might be exceptions when programs do this on their own, but this are rare special cases).
What this config file does is essentially to tell the system: OK, if you need to find out how to contact a machine where you know the name, ask the server listed here to get the IP address.
The current resolv.conf file looks like this. In the ip address, does it mean I have to enter the Godaddy Nameserver’s ip address here?
Even if your own domain is hosted by GoDaddy, that doesn’t mean at all that you have to use their DNS server. Instead, use the DNS server that your VPS provider tells you to use. DNS is a distributed database for a reason. In most cases, your own domain will quite unimportant for your server, but if it is, your providers DNS will either find out the name for you (if it’s recursive) or tell your system “I don’t know anything about that, ask this DNS server instead”.
Read http://en.wikipedia.org/wiki/Domain_Name_System to understand how DNS works to begin with. That will make the role of the local resolver clearer as well.
Source : Link , Question Author : Neel , Answer Author : Sven