Minecraft Can't Connect to Server? Here's the Fix

Most Minecraft "can't connect" errors come down to a version mismatch between you and the server, a DNS/connection glitch, or Java being blocked by your firewall. The fastest fix: switch your Minecraft client to the exact version the server runs, flush your DNS, and allow Java (javaw.exe) through Windows Firewall. For joining a friend's LAN world, make sure you're both on the same version and network. Steps below, in order.

Minecraft Java server — exact port & log path

Port to forward (TCP)
25565
Bedrock port (UDP)
19132
Client log to read the error
%APPDATA%\.minecraft\logs\latest.log
Server log to read the error
logs\latest.log inside the server folder
Common cause of 'Connection refused'
server.properties server-ip is set to a fixed LAN IP — leave server-ip blank to bind all interfaces

Last verified: September 2026

Error codes

Failed to connect / io.netty.channel.ConnectTimeoutException The client could not reach the server before timing out

Cause: Wrong client version, the server being offline, or a firewall/DNS problem blocking the connection.

Fix:
  1. Set your client to the SAME version the server runs (use the launcher's Installations tab to pick the version).
  2. Flush DNS: open Command Prompt and run ipconfig /flushdns, then retry.
  3. Allow Java (javaw.exe / the Minecraft launcher) through Windows Defender Firewall.
  4. Confirm the server address and port are correct (default 25565) and the server is actually online.
Connection refused: no further information / Outdated client or server The versions don't match or nothing is listening on that port

Cause: Client/server version mismatch, or the server isn't running / port not open.

Fix:
  1. Match versions exactly between client and server; 'Outdated client' means you must downgrade/upgrade your client.
  2. If it's your own server, confirm it's running and port 25565 is forwarded to the host PC.
  3. Try connecting by the server's IP directly if a domain name fails to resolve.

Fixes that work for most Minecraft errors

  1. Match versions: your client must be on the identical Minecraft version the server runs (Installations tab in the launcher).
  2. Flush DNS (ipconfig /flushdns) and restart your router to clear a stale connection.
  3. Allow javaw.exe and the Minecraft launcher through Windows Firewall and any antivirus.
  4. For your own server, forward TCP port 25565 to the host PC and use your public IP for internet play.
  5. For a friend's LAN world, both players must be on the same network and same game version.
  6. Update Java to the version your Minecraft build needs (modern versions bundle their own runtime).
  7. If mods/Forge/Fabric are involved, both client and server must run the same modloader and mod list.

FAQ

Why can't I connect to a Minecraft server?

The most common cause is a version mismatch — your client must be on the exact version the server runs. Also flush your DNS and allow Java through the firewall if the connection times out.

How do I fix 'Connection timed out' in Minecraft?

Confirm the server is online and the address/port are correct, flush DNS with ipconfig /flushdns, allow javaw.exe through the firewall, and restart your router.

What port does Minecraft Java use?

TCP port 25565 by default. For your own server you must forward 25565 on the router to the host PC; joining public servers doesn't require you to open any ports.

Why does it say my client is outdated?

Your Minecraft version is newer or older than the server's. Use the launcher's Installations tab to run the exact version the server is on, then reconnect.

Other games