Minecraft "Unknown Host" Fix (Can't Connect to Server)
Fix "Can't connect to server: Unknown host" in Minecraft: typos in the address, the wrong port format, DNS cache, broken domain or SRV records, and VPNs.
Updated Oct 8, 2026 · 6 min read
On this page
- What "Unknown host" means
- Fix 1: Check the address character by character
- Fix 2: Try the numeric IP
- Fix 3: Clear your DNS cache and change DNS servers
- Fix 4: Check the domain's DNS records (server owners)
- Fix 5: Turn off VPNs, proxies and filters
- Fix 6: Bedrock addresses in Java (and the reverse)
- Connecting to a GamezServers server
- FAQ
"Can't connect to server" with "Unknown host" means Minecraft could not turn the server address into an IP. It never reached the server at all. Nine times out of ten the address has a typo, an extra space, or a port written the wrong way. The rest of the time it is your computer's DNS cache or a domain whose records are wrong. Work through the checks below in order, and you will know within a few minutes whether the problem is on your side or the server's.
What "Unknown host" means
When you type play.example.com into Minecraft, the game asks a DNS server what IP address that name points to. "Unknown host" (in older logs, java.net.UnknownHostException) means the answer was "no such name".
Compare it with the other common connection errors:
| Error | What happened |
|---|---|
| Unknown host | The name could not be found. Nothing was sent to the server |
| Connection refused | The IP was found, but nothing was listening on that port |
| Connection timed out | The IP was found, but no reply came back, often a firewall or a server that is off |
If you get refused or timed out instead, read connection refused getsockopt fix, which covers both.
Fix 1: Check the address character by character
Most unknown host errors are a typing mistake. Open the server entry with Edit in the multiplayer list and check:
- No spaces before, after or inside the address. A space copied from Discord is invisible and breaks it.
- No
http://,https://orwww.. Minecraft wants only the name or the IP. - No trailing slash or dot, like
play.example.com/. - The port after a colon, like
123.45.67.89:25601. Not a space, not a semicolon, not a comma. - The right characters.
0andO,1andlare easy to swap when reading an address off a screen. - The full domain, including the ending.
play.exampleis not the same asplay.example.com.
The surest fix is to delete the entry, copy the address fresh from wherever the owner shared it, and paste it with Add Server.
Fix 2: Try the numeric IP
Ask the server owner for the plain IP address and port, like 123.45.67.89:25601, and try that.
- The IP works, the domain does not: the domain is the problem. See Fix 4 if you own it, or tell the owner.
- The IP gives "Connection refused" or "timed out": the address resolves fine, but the server is offline or the port is wrong.
- The IP joins straight away: play on the IP while the domain gets fixed.
Server owners can find the IP in their host's panel. If you self host, our guide on how to find your Minecraft server IP explains public versus local IPs.
Fix 3: Clear your DNS cache and change DNS servers
Your computer remembers DNS answers for a while. If a domain was just created, or recently moved to a new server, your PC may still have the old "not found" answer cached.
On Windows, open Command Prompt and run:
ipconfig /flushdns
On macOS, open Terminal and run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Then fully close and reopen Minecraft. If that does not help, your internet provider's DNS may be slow or blocking the name. Switch your network adapter to a public DNS like Cloudflare (1.1.1.1) or Google (8.8.8.8), or change it on your router so every device benefits.
Quick test: if the server works on your phone using mobile data but not on your Wi-Fi, DNS on your network is the cause.
Fix 4: Check the domain's DNS records (server owners)
If you own the domain, check its records at your DNS provider. A Minecraft domain needs one of these setups:
Option A, A record only. Works when the server runs on port 25565.
| Type | Name | Value |
|---|---|---|
| A | play |
123.45.67.89 |
Option B, A record plus SRV record. Use this when the server runs on another port and you want players to type the domain without a port.
| Type | Name | Priority | Weight | Port | Target |
|---|---|---|---|---|---|
| SRV | _minecraft._tcp.play |
0 |
5 |
25601 |
play.example.com |
Common mistakes that cause unknown host:
- The SRV target points to a name that has no A record of its own.
- The SRV target is an IP address. It must be a hostname.
- The record was made on the wrong subdomain, for example
_minecraft._tcpwhen players typeplay.example.com. - Cloudflare proxy (orange cloud) is turned on for the A record. Minecraft traffic cannot go through Cloudflare's web proxy, so set the record to DNS only.
- The domain expired, or its nameservers were changed and the records were not moved.
You can check from any PC:
nslookup play.example.com
nslookup -type=SRV _minecraft._tcp.play.example.com
If the first returns no address, the A record is missing. If the second returns nothing, the SRV record is missing or misnamed. New records usually work within minutes, but caches can hold old answers for up to the record's TTL. Our custom domain guide walks through the full setup.
Fix 5: Turn off VPNs, proxies and filters
VPN apps, school or work networks, parental control filters and some antivirus web shields replace your DNS. They can block game server names or fail to resolve new domains.
- Disconnect the VPN and try again.
- On school or work networks, try a home connection or mobile hotspot. Many of these networks block game servers on purpose.
- Pause web filtering in your antivirus for a quick test.
Fix 6: Bedrock addresses in Java (and the reverse)
Java and Bedrock servers are not interchangeable. If you add a Bedrock server's address to Java, or the reverse, you usually get a timeout rather than unknown host, but people often mix up the two addresses when a server offers both. Java uses TCP port 25565 by default, Bedrock uses UDP port 19132. A Java server with Geyser installed gives Bedrock players its own port, see how to let Bedrock players join a Java server.
Connecting to a GamezServers server
On a GamezServers Minecraft server, the address sits at the top of the control panel with the port after a colon. Click it to copy it exactly, with no spaces, and paste that into Add Server. If you set up your own domain, point an A record at the IP and an SRV record at the port, as shown above. Want a server for your group without the monthly cost? Credits from sharing your link can pay for it, see free Minecraft server hosting.
FAQ
What does "Unknown host" mean in Minecraft?
Minecraft could not find an IP address for the server name you typed. Usually the address has a typo or a space, or the domain's DNS records are missing or wrong.
Is "Unknown host" my fault or the server's?
Try the server's numeric IP. If the IP works, the problem is the domain (the owner's side) or your DNS cache (your side). If your friends can join with the same domain, it is on your side.
How do I fix Unknown host on Windows?
Recheck the address, then run ipconfig /flushdns in Command Prompt, restart Minecraft, and if needed switch your DNS to 1.1.1.1 or 8.8.8.8.
Why does the server work for my friends but not for me?
Your DNS or network is the difference. Flush your DNS cache, turn off any VPN, and try a public DNS server or mobile data.
Do I need to add the port to the address?
Only if the server does not use 25565 and has no SRV record. Then write it after a colon, like play.example.com:25601.
Skip the setup. Your own Minecraft server.
Then $4.99/mo. Just trying it? $1.25 for 3 days