Our news See more of us on Google? Add
Discord

Can't connect to a Minecraft server: every cause and fix

Troubleshooting guide · Last updated: October 28, 2026 · Java Edition and Bedrock Edition

Can't connect to a server?

Don't worry: in 95% of cases you can fix the problem in a few minutes. This guide covers the 15 most common causes of Minecraft server connection problems, with concrete steps to fix each one. Start with the error messages section: find your error and jump to the matching fix.

Table of contents

  1. Error messages: what they mean
  2. Client and server version mismatch
  3. The server is offline or restarting
  4. Wrong IP address or port
  5. A firewall or antivirus is blocking the connection
  6. Problems on your internet provider's side
  7. DNS problems
  8. VPN interference
  9. Mojang/Microsoft authentication isn't working
  10. Whitelist: you're not on the list
  11. Banned from the server
  12. The server is full
  13. Broken network configuration
  14. Java Edition vs Bedrock Edition
  15. Mod mismatch
  16. Corrupted DNS cache
  17. Port forwarding (your own server)
  18. Frequently asked questions

Error messages: what they mean

Before you start trying random fixes, carefully read the error message Minecraft shows you. Each message points to a different cause. Below is a list of the most common errors and what they mean.

Connection timed out

This is the most common error when you try to connect to a Minecraft server. It means your computer sent a connection request, but the server didn't respond within the required time (30 seconds by default). Your client simply "waited and waited", but nothing came back from the other side.

Possible causes:

What to do: Check the server's status at mcsrvstat.us. If the server is online, the problem is on your side: read the sections on the firewall, DNS and your internet provider.

Connection refused

This error is more specific than "timed out". It means your computer reached the server, but the server actively refused the connection. It's like knocking on a door and hearing "no, you're not coming in".

Possible causes:

What to do: Make sure the server has fully started (the server console should show "Done!"). Check the port in the server.properties file: by default it's 25565 for Java Edition.

io.netty.channel.AbstractChannel$AnnotatedConnectException

This scary-looking error is just a more technical way of saying "couldn't connect". The Netty library (the networking framework Minecraft uses) couldn't establish a TCP connection to the server. Sometimes the message is followed by extra information, such as "Connection refused" or "Connection timed out".

Possible causes:

What to do: Try clearing the DNS cache and temporarily turn off your VPN and firewall. If the problem affects only one server, check that the IP address is correct. If the error affects every server, reset your system's network settings.

Failed to verify username

This error means a problem with authenticating your account. A server with online-mode=true (the default and recommended setting) checks with Mojang/Microsoft whether your session is valid. If the check fails, you get this error.

Possible causes:

What to do: First check the status of Mojang's servers. If everything works, close Minecraft, log out of the launcher, log back in and start the game. If the problem keeps coming back, delete the launcher_accounts.json file from the .minecraft folder and log in again from scratch.

Invalid session (Try restarting your game)

A very similar problem to "Failed to verify username": your session token is out of date or corrupted. Minecraft stores the session locally and sends it to the server every time you connect, so if the session is old or invalid, the server rejects it.

What to do:

  1. Close Minecraft completely (not just the game window, the launcher too)
  2. Open the launcher and log out of your account
  3. Log back in
  4. Launch Minecraft and try connecting to the server

If that doesn't help, open the .minecraft folder (on Windows: %appdata%\.minecraft) and delete the launcher_accounts.json file. The launcher will ask you to log in again, which resets the session completely.

Outdated client! / Outdated server!

This message is simple and clear: your Minecraft client version doesn't match the server's version. For example, if the server runs 1.21.4 and you try to connect from 1.20.6, you'll see "Outdated client! Please use 1.21.4". Likewise, if your client is newer than the server, you'll see "Outdated server!".

What to do: In the Minecraft launcher, go to the "Installations" tab and create a new installation with the version the server requires. You'll find the details in the version mismatch section below.

You are banned from this server

It means exactly what it says: your account (name or UUID) has been added to the server's ban list. There's no technical way around it, so you'll have to contact the server's staff. More in the banned from the server section.

1. Client and server version mismatch

This is one of the most common causes of connection problems, especially after Minecraft updates. Servers don't update automatically: admins do it by hand, often with a delay, because they have to wait for plugins and mods to be updated.

Symptoms: An "Outdated client!" or "Outdated server!" message that names the required version.

How to fix it:

  1. Open the Minecraft Launcher and click the "Installations" tab
  2. Click "New installation"
  3. Pick the version given in the error message from the dropdown list
  4. Give the installation a name (for example "XYZ server - 1.21.4") and click "Create"
  5. Go back to the launcher's main screen, select the new installation and click "Play"

Tip: Some servers use the ViaVersion plugin, which lets players join from different client versions. If the server has ViaVersion, your version just needs to be in the supported range (usually 1.9-1.21+).

2. The server is offline or restarting

It sounds obvious, but it's the second most common cause. Minecraft servers restart regularly (scheduled restarts every few hours), and sometimes they go down because of crashes, hosting problems or maintenance.

Symptoms: "Connection timed out" or "Connection refused". The server doesn't show up in the server list or shows "Can't connect to server".

How to check:

What to do: If the server shows as online on mcsrvstat.us but you can't connect, the problem is on your side. Read on.

3. Wrong IP address or port

A typo in the IP address is a surprisingly common problem. One wrong character, a space at the end or a missing port is all it takes for the connection to fail.

Symptoms: "Connection timed out" or "Unknown host" / "Can't resolve hostname".

How to fix it:

Note: The address localhost or 127.0.0.1 works only if the server is running on your own computer. Don't use it to connect to external servers.

4. A firewall or antivirus is blocking the connection

Your system firewall or antivirus can block Minecraft's network traffic. This is especially common after you install a new version of Minecraft, when the firewall doesn't recognize the new executable.

Symptoms: "Connection timed out" on all servers or only some of them. Singleplayer works normally.

How to fix it on Windows:

  1. Open Control Panel → System and Security → Windows Defender Firewall
  2. Click "Allow an app or feature through Windows Defender Firewall"
  3. Click "Change settings" and look for javaw.exe and Minecraft Launcher on the list
  4. Make sure both apps have the "Private" and "Public" boxes checked
  5. If they aren't on the list, click "Allow another app..." and add the javaw.exe file (usually in C:\Program Files\Java\jre...\bin\javaw.exe or in the Minecraft folder)

How to fix it on macOS:

  1. Open System Settings → Network → Firewall
  2. Click Options and make sure Java/Minecraft is set to "Allow incoming connections"

How to fix it on Linux:

sudo ufw allow 25565/tcp
sudo ufw allow 19132/udp

Antivirus: If you use an antivirus other than Windows Defender (for example Norton, Kaspersky, Avast, Bitdefender), add the .minecraft folder and the javaw.exe file to its exceptions list. Every antivirus has this option in its settings: look for "Exceptions", "Exclusions" or "Whitelist".

Quick test: Temporarily turn off your firewall and antivirus for 2 minutes and try to connect. If it works, you know the firewall is blocking the connection. Don't forget to turn it back on and add the exceptions.

5. Problems on your internet provider's side (ISP)

Some internet providers (especially mobile carriers and LTE/5G networks) block or throttle traffic on non-standard ports, including port 25565, which Minecraft uses.

Symptoms: You can't connect to any Minecraft server, but the internet works normally (websites, YouTube, other games).

How to diagnose it:

What to do: Contact your internet provider and ask whether they block port 25565 TCP. Some providers will unblock it on request. Alternatively, you can use a VPN for gaming.

6. DNS problems

If a Minecraft server uses a domain address (for example play.example.com) instead of a numeric IP, your computer first has to "translate" that name into an IP address using DNS servers. If DNS isn't working properly, Minecraft can't find the server.

Symptoms: "Unknown host", "Can't resolve hostname" or "Connection timed out", but only for servers with domain addresses. Servers with numeric IP addresses work normally.

How to fix it:

  1. Change your DNS server to Google's or Cloudflare's public DNS:
    • Windows: Control Panel → Network and Internet → Network and Sharing Center → Change adapter settings → right-click your connection → Properties → Internet Protocol Version 4 (TCP/IPv4) → Properties → set the DNS servers to 1.1.1.1 and 1.0.0.1 (Cloudflare) or 8.8.8.8 and 8.8.4.4 (Google)
    • macOS: System Settings → Network → select your connection → Details → DNS → add 1.1.1.1
    • Linux: Edit /etc/resolv.conf and add nameserver 1.1.1.1
  2. Clear the DNS cache: see the corrupted DNS cache section below
  3. Use the IP instead of the domain: ask the server admin for the numeric IP address and enter it directly

7. VPN interference

VPNs can both help and get in the way when you connect to Minecraft servers. A VPN sends all your traffic through its own servers, which adds latency (lag) and can cause routing problems.

Symptoms: "Connection timed out" or very high latency (ping > 500 ms) after you turn on the VPN. Without the VPN, everything works normally.

How to fix it:

Exception: If the VPN helps (you can't connect without it, but you can with it), your internet provider is probably blocking the port: see the ISP problems section.

8. Mojang/Microsoft authentication isn't working

Servers with online-mode=true (most public servers) require your Microsoft/Mojang account to be properly verified. If Mojang's authentication servers have problems or your session has expired, you'll get login errors.

Symptoms: "Failed to verify username", "Invalid session (Try restarting your game)", "Disconnected" right after connecting, or "Failed to login: The authentication servers are currently down for maintenance".

How to fix it:

  1. Check the Mojang server status: if the authentication services show any status other than green, you have to wait
  2. Close Minecraft and the launcher completely
  3. In the launcher, click your account and choose "Log out"
  4. Log back in to your Microsoft account
  5. Launch Minecraft and try connecting to the server

Last resort: If none of that helps, go to the .minecraft folder and delete the launcher_accounts.json file. The launcher will ask you to log in again, which resets the session completely. The folder path:

9. Whitelist: you're not on the list

Many private Minecraft servers use a whitelist, which means only approved players can connect. If your name isn't on the list, the server won't let you in.

Symptoms: The message "You are not white-listed on this server!" or "You are not whitelisted on this server".

How to fix it:

10. Banned from the server

If you see the message "You are banned from this server" (possibly with the reason and the date the ban expires), the server's staff have banned your account. The ban can be temporary (with an expiry date) or permanent.

How to fix it:

Note: There's also a global Mojang ban, which blocks you from every server with online-mode=true. It's extremely rare and only applies in extreme cases. If you suspect a global ban, contact Minecraft support.

11. The server is full

Every Minecraft server has a player limit (the max-players setting in server.properties). Once the limit is reached, new players can't join.

Symptoms: The message "The server is full!" or "Server is full" when you try to join.

How to fix it:

12. Broken network configuration

Sometimes the network settings of your operating system or of Minecraft itself get corrupted. It can happen after a system update, a router change, VPN problems or a failed configuration.

Symptoms: You can't connect to any Minecraft server, but the internet works normally. Other online games work without problems.

How to fix it with a network reset on Windows:

  1. Open Command Prompt as administrator (right-click Start → "Terminal (Admin)")
  2. Run these commands one after another:
    netsh winsock reset
    netsh int ip reset
    ipconfig /flushdns
    ipconfig /release
    ipconfig /renew
  3. Restart your computer

Resetting Minecraft: If the problem affects only Minecraft, go to the .minecraft folder and delete the options.txt file and the servers.dat file (you'll lose your list of saved servers, so write the addresses down first). Then launch Minecraft: the files are recreated with default values.

13. Java Edition vs Bedrock Edition: trying to connect with an incompatible edition

This is a fundamental problem that many players don't know about. Java Edition and Bedrock Edition are two different games with different network protocols. You can't connect a Java Edition client directly to a Bedrock Edition server, or the other way around.

Symptoms: The server doesn't show up in the server list at all, "Connection timed out", or an immediate disconnect with no error message.

How to tell the editions apart:

How to fix it:

You can read more about the differences between the editions on our Minecraft servers page.

14. Mod mismatch

If you're trying to join a modded server (Forge, NeoForge, Fabric, Quilt), you need exactly the same mods in the same versions as the server. Even a small difference (for example a mod at version 1.2.3 vs 1.2.4) can stop you from connecting.

Symptoms: "Mod rejections": a list of mods that are missing or have the wrong version. "Incompatible Forge/Fabric version". A disconnect with a message about missing mods.

How to fix it:

  1. Check the server's website or Discord for which mods and versions are required: most servers offer a ready-made modpack
  2. Download the server's modpack and install it through CurseForge, Modrinth or ATLauncher
  3. If there's no modpack, get the exact mod list from the server admin
  4. Make sure your mod loader version (Forge/Fabric/NeoForge) is identical to the server's
  5. Client-side mods (for example OptiFine, Iris, Sodium) are usually safe, but always check the server rules

You can read more about Minecraft mods in our mods guide.

15. Corrupted DNS cache

Your computer stores DNS responses in a cache to speed up later connections. If a Minecraft server has changed its IP address but your computer still remembers the old one, the connection won't work.

Symptoms: You can't connect to a server whose domain address hasn't changed, even though you know the server is running (other players are connecting). On mcsrvstat.us the server shows as online.

How to fix it by clearing the DNS cache:

Windows:

  1. Open Command Prompt as administrator
  2. Type: ipconfig /flushdns
  3. You should see: "Successfully flushed the DNS Resolver Cache."

macOS:

  1. Open Terminal
  2. Type: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  3. Enter your administrator password

Linux:

  1. Open a terminal
  2. Type: sudo systemd-resolve --flush-caches (systemd) or sudo resolvectl flush-caches (newer systemd)

After clearing the DNS cache, restart Minecraft and try connecting to the server. Your computer will fetch a fresh DNS record with the current IP address.

Extra tip: Minecraft Java Edition also has its own DNS cache built into Java. To reset it, just close and restart Minecraft. In older Java versions (8 and earlier), the DNS cache is kept for the whole JVM session, so restarting the game helps.

Port forwarding: how to share your own server

If you host your own Minecraft server and your friends can't connect, the problem is almost certainly missing port forwarding on your router. By default your router blocks all incoming connections from the internet, so you have to tell it to pass traffic on the Minecraft port through to your computer.

Which ports to open

Edition Default port Protocol Notes
Java Edition 25565 TCP Can be changed in server.properties (server-port)
Bedrock Edition 19132 UDP Can be changed in server.properties (server-port)

Step by step: port forwarding on your router

  1. Find your local IP address:
    • Windows: Open Command Prompt and type ipconfig. Look for "IPv4 Address" under your network adapter (usually 192.168.0.x or 192.168.1.x)
    • macOS: System Settings → Network → select your connection → your IP is shown there
    • Linux: Type ip addr or hostname -I in a terminal
  2. Log in to your router's admin panel:
    • Open a browser and enter the router's address: 192.168.0.1 or 192.168.1.1 (check the sticker on the router)
    • Log in with the admin credentials (default: admin/admin, or admin plus the password from the sticker)
  3. Find the port forwarding settings:
    • Look for an option called "Port Forwarding", "Virtual Server" or "NAT": where it is depends on the router's manufacturer
    • Popular routers: TP-Link (Advanced → NAT Forwarding → Virtual Servers), Netgear (Advanced → Port Forwarding), ASUS (WAN → Virtual Server)
  4. Add a forwarding rule:
    • Name: Minecraft (any name works)
    • External port: 25565 (Java) or 19132 (Bedrock)
    • Internal port: the same as the external one
    • IP address: your local IP address from step 1 (for example 192.168.0.105)
    • Protocol: TCP (Java) or UDP (Bedrock); if you're not sure, choose TCP/UDP (both)
  5. Save the settings and restart the router (some models need a restart)
  6. Check your public IP address: Go to whatismyip.com and give that address to your friends
  7. Test it: Ask someone outside your network to connect to your public IP:port. You can also check whether the port is open at yougetsignal.com
Important security notes
  • Opening ports on your router exposes your machine to traffic from the internet, so make sure your Minecraft server is up to date and secured
  • Set a static IP address on the server computer, because DHCP can change your local IP the next time the router restarts
  • Consider professional Minecraft hosting if you don't want to expose your home network
  • Alternatives to port forwarding are playit.gg or ngrok: tunnels that don't require opening ports on your router

Alternatives without port forwarding

If you can't open ports (for example you live in a dorm, use mobile internet or your router doesn't allow it), you have a few options:

Extra diagnostic tips

How to check whether the server is reachable from your network

Before you report the problem to the server admin, run some basic diagnostics:

  1. Ping: Open Command Prompt / Terminal and type ping play.example.com (replace it with the server address). If you get replies with times (for example 45 ms), the network is fine. If you see "Request timed out", it's a network problem or the server doesn't respond to ICMP
  2. Traceroute: Type tracert play.example.com (Windows) or traceroute play.example.com (macOS/Linux). You'll see how many "hops" the connection goes through. If the route stops at a specific node, the problem is in the network, not on your side or the server's
  3. Telnet / ncat: Type ncat -v play.example.com 25565 or telnet play.example.com 25565. If the connection goes through, the port is open. If you get "Connection refused", the server isn't listening on that port

Resetting Minecraft to its default network settings

If nothing helps and you suspect Minecraft has corrupted files:

  1. Close Minecraft and the launcher
  2. Go to the .minecraft folder
  3. Back up the saves (worlds), resourcepacks and screenshots folders
  4. Delete the options.txt and servers.dat files
  5. Launch Minecraft: the files are recreated with default values
  6. Add the server again by hand and try to connect

Bedrock Edition problems on consoles

Players on Xbox, PlayStation and Nintendo Switch can run into extra connection problems:

When to contact the server admin

If you still can't connect after going through all the steps above, the problem is probably on the server's side. Message the admin with this information:

Quick cheat sheet: what to do, step by step

If you don't want to read the whole article, follow these steps in order:

  1. Check whether the server is online: mcsrvstat.us
  2. Check the IP address and port: compare them with the server's official website
  3. Make sure your Minecraft version matches the server's version
  4. Make sure you're playing the right edition (Java vs Bedrock)
  5. Temporarily turn off your VPN
  6. Temporarily turn off your firewall and antivirus (remember to turn them back on!)
  7. Clear the DNS cache: ipconfig /flushdns
  8. Log out of the launcher and log back in
  9. Try a different network (a hotspot from your phone)
  10. Reset your system's network settings

Frequently asked questions

Why can't I connect to a Minecraft server?

The most common causes are: the server is offline or restarting, a wrong IP address or port, a game version that doesn't match the server's version, a firewall or antivirus block, problems with your Mojang account authentication, not being on the server's whitelist, or trying to join a Bedrock server from Java Edition (or the other way around). Go through the quick cheat sheet above to check each cause systematically.

What does the Connection timed out error mean in Minecraft?

The "Connection timed out" error means your computer tried to connect to the server, but the server didn't respond within the required time (30 seconds). Causes: the server is off, a wrong IP address/port, a firewall blocking port 25565 (Java) or 19132 (Bedrock), problems with your router or internet provider. Details in the Connection timed out section.

How do I fix the io.netty.channel.AbstractChannel error in Minecraft?

The io.netty.channel.AbstractChannel$AnnotatedConnectException error means a network connection problem at the level of the Netty library. Solutions: check that the IP address and port are correct, turn off your VPN, reset the DNS cache (ipconfig /flushdns on Windows), temporarily turn off your firewall, and check whether the server is online at mcsrvstat.us. More in the io.netty section.

Which port do I open for a Minecraft server?

For a Java Edition server, open port 25565 TCP in your firewall and router. For a Bedrock Edition server, open port 19132 UDP. If you changed the default port in the server.properties file, open that specific port. Remember to open the port both in the system firewall and on the router (port forwarding). Step-by-step instructions are in the port forwarding section.

Why does Minecraft show "Failed to verify username" or "Invalid session"?

These errors mean a problem with authenticating your Microsoft/Mojang account. Solutions: first check the status of Mojang's servers. If everything works, log out of the Minecraft launcher and log back in, clear the session files (delete launcher_accounts.json from the .minecraft folder) or restart the launcher. On servers with online-mode=false, these errors shouldn't appear.

Can I join a Bedrock Edition server from Java Edition?

Not directly: Java Edition and Bedrock Edition use different network protocols and aren't compatible with each other. To allow cross-platform play, the server has to install the GeyserMC plugin, which builds a bridge between the two editions. Without that plugin, Java players can't connect to a Bedrock server and vice versa. Check the server's website to see whether it supports cross-play.

Related articles