My server can't resolve domains?

I am on a VPS that is pretty much unmanaged so it means im on my own. I did my best to configure it so i can host my own site for other people to see it online but seems like i have network problems because in the last days many of my users report they cant enter my site from my domain and seems like Google and Facebook cant either (this never happened before).

Its weird because i can enter my site without problems and so many other people as well. But then i tried to make a php include and i get this error:

Warning: include(): php_network_getaddresses: getaddrinfo failed: Name or service not known in

I was told that seems like my server cant resolve domains. The includes work if i use IPs instead of domains. So it means i have a DNS problem or something? What can i do to fix it? Im on a Linux 2.6.32-431.11.2.el6.x86_64 on x86_64 CentOS Linux 6.5

I have this on my resolve.conf

# Generated by NetworkManager   # No nameservers found; try putting DNS servers into your # ifcfg files in /etc/sysconfig/network-scripts like so: # # DNS1=xxx.xxx.xxx.xxx # DNS2=xxx.xxx.xxx.xxx # DOMAIN=lab.foo.com bar.foo.com   nameserver 8.8.8.8  nameserver 8.8.4.4

Thank you.

You can't resolve hostname, may be dns problem (may be using old cached DNS records), host may be unreachable, try to use ip instead of hostname. also try to add hostname in /etc/hosts file

192.x.x.x example.com

Thanks for your answer. I figured out its a dns problem but howcan i fix it? Is it something physical or something i can fix by editing files? What IP should i put there? What instead of example.com? my own domain?

do entry of your server ip and server name on your local server's hosts file, since you said "cant enter my site from my domain", your resolve.conf looks fine to me as you are using google's public DNS servers

The IP is the local IP of the machine or the public one? Thank you.

Public
Same IP you would if you do http://IP in your browser

Thanks. And what about server name? Its the name of the machine?

Hello? Help please?