Can't connect to a Minecraft server? How to fix it
“Connection timed out”, “Connection refused” and “Unknown host” all mean the game couldn't reach the server, but each points to a different cause. Find your error below, then work through the checks for players or for server owners.
What the error tells you
| Error | What it usually means |
|---|---|
| Connection refused | The address answers, but nothing is listening on that port: the server is off, still starting, or uses a different port. |
| Connection timed out | No answer at all: a firewall drops the traffic, the IP is wrong, or the route to the server is broken. |
| Unknown host | The domain name doesn't point anywhere: a DNS record is missing or mistyped. |
| Outdated client, outdated server or incompatible client | The player and the server run different Minecraft versions. |
| Failed to verify username | The account check with Minecraft's login servers failed. |
| Not whitelisted | The server only lets in players on its list. |
Joined, but cut off or kicked straight away? See the guide to “Failed to verify username” and the guide to “connection forcibly closed”.
Checks for players
- Check the address. Copy it exactly from the server's website or Discord. If it includes a port, type it as
address:port. - Match the version. Choose the server's Minecraft version in the launcher's installations.
- Restart the launcher and sign in again. This fixes most “Failed to verify username” errors.
- Turn off your VPN and try another network, such as a phone hotspot.
- Allow Java through your firewall. Windows sometimes blocks it after an update.
- Check your edition. Phones, consoles and the Bedrock app for Windows play Bedrock Edition, which can't join a Java Edition server on its own.
Checks for server owners
1. Is the server running and listening?
Wait for “Done” in the console before joining. Then check that something is listening on the port:
ss -tln | grep 25565
If nothing shows, the server isn't listening there; check server-port in server.properties.
2. Leave server-ip empty
In server.properties, server-ip should normally be empty, so the server listens on every address. A wrong IP there is a common cause of “Connection refused”.
3. Open the port
Java Edition uses TCP. Allow your port in the server's firewall, and in any firewall your host provides:
sudo ufw allow 25565/tcp
Then test from a different network, with an online port checker or from another machine:
nc -vz your-server-ip 25565
4. Check your DNS records
If players join with a domain, its A record must point to the server's IP. To let players leave out a custom port, add an SRV record:
_minecraft._tcp.play.example.com. SRV 0 5 25566 mc.example.com.
The target of an SRV record must be a host name with its own A record, not an IP address. DNS changes can take a while to reach every player.
5. Versions and logins
- Players on a newer version get “Outdated server”. Update the server, or add a plugin such as ViaVersion that lets newer clients join.
- Keep
online-mode=true, unless the server sits behind a Velocity or BungeeCord proxy that checks accounts for it. - For a private server, check the list with
whitelist listand add players withwhitelist add PlayerName.
6. Behind a proxy?
On a Velocity or BungeeCord network, players connect to the proxy, not to the game servers behind it. If the proxy can't reach a game server, players see an error from the proxy instead. Check the server addresses in the proxy's config, and that each game server uses the same forwarding settings as the proxy.
7. Only some players affected?
If players in one country, or on one internet provider, time out while others join, the route from their network is the problem, or a DDoS filter is blocking them. Ask for their IP address and the time it happened, and send both to your host. If attacks are the reason you filter traffic, see how to protect a Minecraft server from DDoS attacks.
Host your Minecraft server in Singapore
Low ping for players in India, Malaysia and Indonesia, on fast AMD EPYC cores with NVMe and DDoS protection.
