Fix: Minecraft Unknown Host Error

Are you met with the "Unknown host" error in Minecraft and you don't know why? Here's a simple guide on how to fix the unknown host issue with ease.

In Minecraft, joining a friend’s server requires the use of the “Direct Connect” command. However, sometimes users report seeing the “Unknown Host” error message when attempting to join, ultimately preventing them from playing together.

If you experience this problem too and cannot find a way to overcome it, keep on reading, as this guide is dedicated to helping you resolve the issue quickly and efficiently.

Without any more delay, let’s dive into it.

Table of ContentsShow

The Problem Explained

This specific issue seems to be common, as many members of the Minecraft community reported seeing it at one point while trying to join a server via the game’s direct connect feature.

The error screen doesn’t show much besides the “unknown host” message, which can often confuse users who see it for the first time.

The reason for this is that there are no clear indications or even a suggestion on the error screen on what may be causing the problem, as shown in the image below.

Minecraft Unknown Host

Luckily, there are a few things you can do in an attempt to fix the problem, and although the first one you try may not solve the issue, the others should, so work your way down the list until you find the one that helps.

Let’s take a look.

Fix 1: Input The Correct IP

Joining a Minecraft server via the Direct Connect feature requires you to input the host’s correct IP address and port.

If you are unsure about locating the right IP address and port, refer to the steps below that explain the whole process from beginning to end.

  1. On the host PC, open Command Prompt as administrator and type in “ipconfig”.
  2. Copy the ipv4 address and send it to whoever needs to join your server.
  3. Start the LAN world and take a look at the chat field, where the port number should be listed, as shown in the image below.
    Minecraft Local Game Port
  4. Send this number as well to anyone who needs to join your server.

If you are not the host, explain the process to the person who is, so they can send you the correct and required information for you to be able to join their Minecraft world.

Note: Take a look at this helpful video if you want to visualize the process from beginning to end.

When players try to join a server by inputting an incorrect IP address and Port number, they’ll get the Unknown Host Error.

Fix 2: Disable Your Firewall Or Allow Minecraft Through It

Program under Windows Defender Firewall Inbound Rules

The firewall built into your operating system protects you from potential threats you can run across while using your computer. However, it sometimes misinterprets safe files and connections as dangerous and could block your access to them.

This happens with third-party antivirus programs and firewalls too.

So, as a potential fix for this solution, we recommend temporarily disabling your firewall or third-party antivirus software that may be blocking your connection to the Minecraft server you’re trying to join.

If you don’t feel comfortable disabling the firewall altogether, which is a legitimate security concern, you can instead add only Minecraft to the list of exceptions.

Here’s how to do that:

  1. Click on the Windows Search Box and type in Firewall & Network Protection. Press Enter on your keyboard to open the panel.
  2. Scroll down until you see the Allow an app through the firewall option, then click on it.
  3. Add Minecraft to the list of apps your firewall should ignore.

You can also include Minecraft as an exemption in the Microsoft Defender Antivirus settings.

Doing this should ensure nothing obstructs your connection to the server you’re attempting to join, but if that wasn’t the issue initially, it won’t work.

Luckily, there are more things you can try. 

Fix 3: Flush Your DNS

Flushing your DNS clears cached IP addresses and other records from your cache, which can help you resolve many internet-related issues.

This isn’t a specific fix for the Minecraft problem in question but rather a general measure that is often used when users are facing a similar issue. It takes just a few seconds to do and often proves useful, so give it a try.

Here’s how to flush your DNS.

  1. Click on the search button located in the bottom-left corner of your taskbar, right next to the Windows logo. Type in Command Prompt and right-click the first result, then select Run as Administrator.
    right clicking Windows 10 Command Prompt and selecting Run as Administrator
  2. Once the Command Prompt window is open on your screen, type in the following command: “ipconfig /flushdns”, and then press Enter on your keyboard to initialize it. You will receive a return message saying that your DNS Resolver Cache is successfully flushed, as shown in the screenshot below.
    ipconfig /flushdns, Successfully flushed the DNS Resolver Cache

After completing these steps, try joining the server you previously couldn’t. A lot of Minecraft players suggested that this method helped resolve the problem.

Fix 4: Restart Your Router

If others can join the host’s server but you cannot, it’s recommended that you restart your router and try again. If nobody can join the host’s server, it’s recommended that they restart their router as well.

The optimal way to do this is by simply switching the device off, waiting a few minutes, then switching it back on. Wait a few moments until the connection is restored, then start Minecraft and attempt to join the server once more.

It should now work, as this method helped many other users solve the problem.


Now you know which steps to take when you get the Minecraft Unknown Host Error. Hopefully, this will help you overcome the problem and get back to playing.

If none of this helps, reinstalling Minecraft could also work, but use that method as a last resort only since it takes the most time compared to all others.

Related Reads

Friends Cannot Connect To Minecraft Server Fix
Fix: Friends Can’t Connect To Minecraft Server
Bojan Veselinovikj

Bojan is a video-game developer and a tech enthusiast. Combining these two passions allow him to keep you informed on everything that's new in this fast-paced digital world.