How to Fix ‘Can’t Resolve Hostname’ Error on Minecraft

Some Minecraft players have encountered the ‘Can’t resolve hostname’ error when trying to join a server, forbidding them from joining any server.

Can’t resolve hostname – Minecraft Error

Note: The ‘Can’t resolve hostname’ error means that the hostname you are trying to connect to cannot be resolved to an IP address.

After a deep investigation of this issue, we came up with a shortlist of possible culprits that cause this error to happen:

  • Miswritten IP address – This error could appear if you’ve mistyped the address, even if you added one space between the numbers. You need to make sure that the IP address is written perfectly.
  • Firewall blocking Minecraft – The Windows Firewall’s job is to protect your system from network-based threats, so is set by default to protect Minecraft, but this might be blocking the game to work properly. To fix this, you need to disable the Firewall for Minecraft from the Windows Firewall settings.
  • Bad DNS Range – Another possibility that is known to cause this behavior for some users is a badly assigned DNS range. If this scenario is applicable, you can fix this issue by replacing your current DNS range with a more stable one.

Now that you are aware of all the possible causes that trigger this error, here is a list of methods that will help you get rid of the ‘Can’t resolve hostname’ error:

Make sure that the server’s IP address is written correctly

Before jumping straight to the fixes, some affected players suggest that you should double-check the server’s IP address to see if it is mistyped.

Make sure that there are no extra spaces or characters in the address you typed to confirm that this is not the problem.

After you are sure that the server’s IP address is typed correctly, try to access the server again to see if the issue still occurs.

If you’ve done that and the error still appears, check below the following method.

Disable Firewall for Minecraft

A few players suggest that you will fix the ‘Can’t resolve hostname’ error by disabling the Windows Firewall for Minecraft.

The Windows Firewall is used to protect your Windows system from network-based threats. You can always configure these Windows Firewall settings from the Control Panel settings.

If you don’t know how to do that, follow the next instructions:

  1. Press Windows key + R and type ‘control’, then press Enter.

    Opening up the Control menu
  2. Inside the Control Panel menu, search for Allow an app through Windows Firewall and access it.
    Allowing an app through Firewall
  3. After that, firstly you need to click on Change settings to give administrator permission. Through the list of apps search for Minecraft, then click on Remove to disable the firewall for Minecraft.
    Configuring the allowed apps
  4. Now test the game and if your problem is still occurring, check below the last method.

Edit the DNS server address

Some people recommend changing the DNS server address for your network to fix the ‘Can’t resolve hostname’ error. The DNS server is set by default to pick an address automatically, so you have to change that from the Settings.

A DNS server is a computer server that contains a database of public IP addresses and their associated hostnames, and in most cases serves to resolve, or translate, those names to IP addresses as requested.

Follow the next guide if you don’t know how to change the DNS server address:

  1. Use the taskbar search option to search for Network and access the first result.
    View networks and tasks
  2. Inside the Network and Sharing Center, click on Change adapter settings.

    Changing the adapter settings
  3. Now right click on the Network address you are using, then click on Properties.

    Accessing the network properties screen
  4. Through the list of items that appeared on your screen, search for Internet Protocol Version 4 (TCP/IPv6), highlight it and click on Properties.

    Accessing the Properties screen of IPv4
  5. Now, click on the circle next to Use the following DNS server addresses, then insert the following codes inside the two boxes:
    208.67.222.222
    208.67.220.220
    Adjusting the DNS servers
  6. After that, click on OK and your ‘Can’t resolve hostname’ error will be fixed.
ABOUT THE AUTHOR

Kamil Anwar


Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.