

If none of the above solutions work, you can try restarting your networking services. If you find an incorrect entry, edit the file with a text editor and correct the IP address. Make sure that the domain name you’re trying to access is not listed with an incorrect IP address. This will show you the contents of your hosts file. To check your hosts file, run the following command: If the domain name you’re trying to access is listed in your hosts file with an incorrect IP address, you’ll encounter this error. The hosts file contains a list of IP addresses and domain names that your computer uses to resolve domain names locally. Save and exit the file, then try resolving the domain name again.Īnother possible cause of the “unable to resolve host” error is a problem with your system’s hosts file. To do this, run the following command:Īdd the DNS servers you want to use in the following format: If the output of this command doesn’t show any DNS servers, you’ll need to configure your DNS settings manually by editing the nf file. This will show you the DNS servers that are currently configured on your system. You can verify this by running the following command in the terminal: Usually, your computer will automatically use your internet service provider’s (ISP) DNS server or the DNS server configured on your router. The next thing to check is your DNS configuration. If it’s successful, move on to the next step. Ping a website like to check that you have internet connectivity. If you can’t connect to the internet, you won’t be able to resolve any domain names. If you’ve run into this error, don’t worry – there are several things you can do to fix it.īefore you do anything else, make sure that your internet connection is working properly. Other possible causes of the “unable to resolve host” error include network connectivity issues or problems with your system’s hosts file. One of the most common is a DNS resolution problem, which means that your system is having trouble querying the DNS server for the IP address associated with the domain name you’re trying to access. There are a few reasons why you might encounter this error. This error message typically appears when you try to connect to a host or website using a domain name, but your system is unable to resolve the domain name into an IP address. If you’re a Linux user, you’ve probably come across the “unable to resolve host” error at some point.
