← All guides
FreaksMC Guides

How to Fix the 'Unknown Host' Error in Minecraft

Updated November 24, 2026 · 4 min read

You type in a server address, hit Join, and Minecraft says "Unknown host", or the log shows java.net.UnknownHostException. Unlike most connection errors, this one is very specific: your computer could not turn the server name into an IP address. The server might be running perfectly. Your game just cannot find it.

Short answer
"Unknown host" means the server name could not be looked up. Check the address for typos first. If it is a brand new address, wait a few minutes for it to spread. Then flush your DNS cache (ipconfig /flushdns on Windows) and restart Minecraft. If it still fails, try a public DNS like 1.1.1.1. Server owners should check that the domain has the right DNS record.

What the error actually means

Server addresses like play.example.com are names. Before connecting, your computer asks a DNS server, which works like a phone book, for the IP address behind that name. "Unknown host" means that lookup came back empty.

So the problem is never the server's lag, version or mods. It is always one of:

Fixes for players

1. Check the address carefully

This is the cause most of the time.

Copy and paste the address from the server owner if you can instead of retyping it.

2. Wait a few minutes if the address is new

When a domain or subdomain is first created, it can take a few minutes, occasionally longer, before every DNS server knows about it. If your friend just set it up, give it 5 to 10 minutes and try again.

3. Flush your DNS cache

Your computer remembers lookups for a while. If it cached a "not found" answer, it keeps failing even after the address starts working.

Windows: open Command Prompt and run:

ipconfig /flushdns

macOS: open Terminal and run:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Then fully close and reopen Minecraft. Java also keeps its own cache while the game is open.

4. Try a different DNS server

Some internet providers' DNS servers are slow to update or have problems. Switching your computer or router to a public DNS service often fixes it right away. Common choices are 1.1.1.1 and 8.8.8.8. You can change this in your network adapter settings or your router settings.

5. Test the address outside Minecraft

Open Command Prompt or Terminal and run:

nslookup play.example.com

Fixes for server owners

If several players get "Unknown host", the problem is probably the domain setup.

Our custom domain guide walks through setting up A and SRV records step by step.

On FreaksMC, every server comes with a free subdomain that is set up for you, so there is no DNS to configure. If you add your own domain, support can check the records with you.

Related errors

Quick checklist

  1. Address typed exactly right, no spaces or http://.
  2. New address? Wait 5 to 10 minutes.
  3. DNS cache flushed and Minecraft fully restarted.
  4. Public DNS tried.
  5. nslookup shows whether the name exists.
  6. Server owner: A or SRV record correct and the domain not expired.

Want a server that just runs fast?

FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.

See plans from $3/mo

We use cookies for analytics & ads to measure how our site performs. Essential cookies always run. See our Privacy Policy.