This is normally not a sharepoint issue esspecially if you can still get to the sharepoint server via IP. This is normally a DNS issue. Are you using Windows internal DNS? If so restart the service. If that does not work restart the dns server and the sharepoint server.
Now do a ping sharepointserver from the command line of the dns server and from the dns server do they match? If not on the sharepoint server do a ipconfig /flushdns