# “Unknown host” and “Can't resolve hostname” in Minecraft: how to fix it

> What “Unknown host” and “Can't resolve hostname” mean in Minecraft and how to fix them: the address, your DNS, SRV records and the port.

Original page: https://napnodes.com/en/guides/minecraft-unknown-host · Updated: 2026-11-12

You type the server address, hit “Join Server” and Minecraft replies “Failed to connect to the server” with “Unknown host” underneath. Or the server list shows “Can't resolve hostname” in red. The server isn't off and you don't need to open any ports: your game hasn't even found which machine that name belongs to. Here's why it happens and how to fix it, from the most common cause to the rarest.

## What the message means

An address like `play.example.com` is a name. To connect, your PC asks DNS (the internet's “phone book”) which IP that name has. “Unknown host” and “Can't resolve hostname” are the same failure: DNS answered that the name doesn't exist, or didn't answer at all.

That's why the usual fixes don't help here: not opening ports, not restarting the server, not changing versions. The game stops before it even tries to reach the server.

A quick clue: if you type a numeric IP (`51.75.10.20`), this error can't appear, because there's no name to look up. If you get it, what you typed is a name, and the problem is in the name or in the DNS of whoever is trying to join.

If you get “Connection refused” or “Connection timed out” instead, the name was found and the problem is something else: [what each one means](https://napnodes.com/en/guides/minecraft-connection-refused-timed-out).

## 1. The address is mistyped

This is behind almost every case. One wrong letter, `.com` instead of `.net`, a comma instead of a dot, a space that slipped in while copying or `http://` in front: to DNS it's a different name, and that one doesn't exist.

1. **Copy it instead of typing it**: Ask for the address in writing (a message, not a photo or out loud) and paste it into “Server Address”. Remove anything extra before and after it: no `http://`, no `https://`, no slash at the end.
2. **Check the port**: If it has a port, it goes right after with a colon: `play.example.com:25570`. No spaces or other characters between the name and the number.
3. **Test it from outside**: Paste it into [Is my Minecraft server online?](https://napnodes.com/en/tools/minecraft-server-status). If it says the address doesn't exist, the name is wrong or has stopped existing; if it responds, the name is fine and the problem is on your PC or network (go to section 3).

## 2. The name no longer exists or doesn't exist yet

A name can disappear without anyone touching the game. Free DDNS names expire: No-IP asks you to confirm the name every 30 days and, if nobody does, it stops working ([the dynamic IP guide explains it](https://napnodes.com/en/guides/minecraft-server-dynamic-ip-ddns)). A domain that wasn't renewed stops resolving. And if the server owner changed its name, the old one may stop working.

The other way round, a newly created or newly changed name takes a while to show up everywhere: DNS servers keep answers for some time, including “doesn't exist”. If the owner has just created it, wait a few minutes and try again; if it's still the same after an hour, the record is set up wrong.

## 3. Everyone can join except you: your DNS

If the same address works for your friends and not for you, the name exists and what's failing is your DNS: your router's, your ISP's or something that filters what you can open.

1. **Try your phone's mobile data**: Share your phone's connection with the PC and try to join again. If it works that way, the problem is in your home network.
2. **Clear what your PC has saved**: On Windows, open “Command Prompt” and type `ipconfig /flushdns`. Close Minecraft completely and open it again: the game also keeps the answer while it's open.
3. **Change your DNS**: In your PC's network settings (or the router's, for the whole house), set the DNS to 1.1.1.1 and 1.0.0.1 (Cloudflare) or 8.8.8.8 and 8.8.4.4 (Google). It's free and you can undo it whenever you like.
4. **Remove whatever filters**: Parental controls, a school, dorm or work network, some antivirus programs and blockers like Pi-hole can deny names they don't know. Try without them, or ask for the server's domain to be allowed.
5. **Check the hosts file**: If you ever pointed a name somewhere by hand, check `C:\Windows\System32\drivers\etc\hosts` on Windows (or `/etc/hosts` on Mac and Linux) and delete the line that mentions it.

## 4. Custom domain with an SRV record

If the server uses a custom domain with an SRV record (to join without typing the port), there are two mistakes that give exactly this error.

The first is typing the port. Minecraft Java only looks up the SRV record when the address has no port. If you type `mc.yourdomain.com:25570`, it skips the SRV and looks up the IP of `mc.yourdomain.com` itself; if that name only has the SRV and no A record, you get “Unknown host”. With SRV, join without the port.

The second is an SRV pointing to a target that doesn't exist: a typo in the “target” or a host name that was deleted. The SRV sends the game to that name, and if that name has no IP, there's nowhere to go. With Cloudflare, the target's record has to be “DNS only”.

To check from “Command Prompt”: `nslookup -type=SRV _minecraft._tcp.mc.yourdomain.com` should return the port and the target, and `nslookup` followed by that target, an IP. How to write each record, in [a custom domain for your server](https://napnodes.com/en/guides/minecraft-server-custom-domain).

## What doesn't help

Opening ports, reinstalling Minecraft, switching launchers or versions, restarting the server or touching `online-mode`: all of that comes into play after the server has been found, and here the game hasn't found it yet. The only things that matter are the name you type and the DNS of whoever is joining.

## On NapNodes

Every server has its address `<identifier>.play.napnodes.com`, and in Minecraft Java you join without typing the port. The identifier address always works: if an address with a chosen name gives you trouble, try that one.

1. **Copy the address from the panel**: In “Home”, the “Address to play” card. Send it to your friends in writing, or use “Copy the link”, which takes them to a page with the address and how to join.
2. **If you've just changed its name**: With “Change name”, the new address works within a couple of minutes and the one you chose before stops working. Tell your friends to save the new one.
3. **If it only fails for one person**: It's their DNS: they should follow section 3. If it fails for everyone and the status tool can't find it either, write to us from “Help”.

## Questions

### What does “Unknown host” mean in Minecraft?

That your game couldn't find any IP for the address you typed: the name is mistyped, no longer exists or your DNS can't find it.

### Is it the same as “Can't resolve hostname”?

Yes. “Unknown host” appears when you try to join and “Can't resolve hostname” in the server list, but both say the name couldn't be turned into an IP.

### Does opening ports fix it?

No. This error appears before the game tries to connect to the server, so ports have nothing to do with it. Check the address and, if it only happens to you, change your DNS.

### Why does it work for my friends and not for me?

Because the name exists and what's failing is your DNS. Try your phone's mobile data, clear the cache with `ipconfig /flushdns` on Windows and set 1.1.1.1 or 8.8.8.8 as your DNS.

### Why does it appear when I type the port after my domain?

If your domain only has an SRV record, Minecraft Java doesn't look at it when you type the port and looks up the IP of the name itself. Join without the port or add an A record to that name.

---

NapNodes gives you a free Minecraft server, no card and no end date: it isn't always on (it switches itself off after an hour with nobody on, and you start it again with one click). How it works: https://napnodes.com/en/free. Paid plans, always on and with no commitment: https://napnodes.com/en/pricing.
