Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
“Can’t resolve hostname” means Minecraft could not turn the server name you entered into an IP address. It is a name-resolution failure, not proof that the server is offline. Re-enter the address exactly, test the numeric IP:port, run nslookup, inspect your Windows DNS settings, and clear a stale cache with ipconfig /flushdns. If the numeric address works, the server is reachable and the hostname or DNS record needs attention. If neither address works, the owner must check the server, port, forwarding, and firewall.
The steps below separate a typo, a local DNS problem, and a server-side record or port problem so you do not waste time reinstalling Minecraft or changing unrelated account settings.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →As an Amazon Associate I earn from qualifying purchases.
What does “Can’t resolve hostname” mean in Minecraft?
Minecraft Java’s multiplayer screen displays this message when the hostname in the server address cannot be converted into an IP address. Java reports the underlying condition as an UnknownHostException; Oracle defines that exception as being thrown when “the IP address of a host could not be determined.” The failure happens before Minecraft opens a socket to the server.
A hostname can fail to resolve because it was typed incorrectly, its DNS record is missing or expired, a recently changed record has not reached your resolver yet, or your local network is returning a stale or otherwise unusable result. The message therefore identifies the lookup stage only. It does not, by itself, establish that the Minecraft process has stopped.
Popular on Amazon
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Use this distinction throughout troubleshooting: first prove whether the name resolves, then prove whether the resulting address and port accept a connection. Authentication, whitelists, and game versions matter only after name resolution and connection setup have succeeded.
What is the quickest way to isolate the problem?
Run these checks in order. Each result points to a different owner of the fault.
| Check | What to do | What the result tells you |
|---|---|---|
| Address spelling | Copy the server address again, removing spaces and punctuation errors. | A corrected entry can resolve immediately if the original contained a typo. |
| Numeric address | Enter the supplied IP:port instead of the hostname. |
If it works, the server is reachable and the hostname/DNS path is the problem. |
| DNS lookup | Run nslookup your-hostname.example in Windows Command Prompt. |
You see what the configured DNS server returns for that name. |
| Local configuration | Run ipconfig /all and inspect the adapter, gateway, and DNS-server entries. |
Missing or invalid network information points to the client connection. |
| Cache refresh | Run ipconfig /flushdns, repeat nslookup, and retry Minecraft. |
A stale negative response may be removed from the Windows resolver cache. |
| Second network | Try a phone hotspot or another connection. | Success elsewhere implicates the normal network’s resolver, VPN, security software, or DNS path. |
Do not repeatedly reinstall Minecraft before these checks. Reinstallation does not repair a DNS record, a resolver response, or a server’s port forwarding.
How do I fix the error as a Minecraft player?
1. Re-enter the address exactly
Obtain the address from the server owner or the hosting control panel and copy it character for character. Remove leading or trailing spaces, accidental punctuation, and line breaks. Hostnames are not interchangeable with look-alike spellings, even when the difference is a single character.
If the owner supplied a port, enter it with a colon: hostname.example:25565 or whatever port was provided. A semicolon is not the separator Minecraft expects. Do not add a port that the owner did not give you merely because another server uses one.
Recommended Free Tools
2. Test the direct IP and port
Replace the hostname with the numeric address supplied by the owner, keeping the port: 203.0.113.10:25565 is an example of the format, not an address to use. A successful connection proves that the server can be reached and narrows the fault to the name, its DNS record, or the resolver you used.
If the numeric address fails in the same way, the issue is no longer limited to hostname lookup. Continue with server-status, port, firewall, and forwarding checks instead of assuming DNS is the only cause.
Also popular on Amazon
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
3. Run nslookup in Windows
Open Command Prompt and run:
nslookup your-hostname.example
Replace the example with the exact hostname, without the port suffix. Microsoft explains that nslookup does not use the client’s DNS cache; it asks the DNS server configured for the computer. That makes it useful for distinguishing a cached Minecraft result from the answer currently being returned by your network’s resolver.
A successful response normally includes the DNS server used for the query and an address record for the hostname. If the response says that the name does not exist, check the spelling first. If the owner recently created or changed the address, provide the result to them and allow time for resolver caches to update.
Free tools Windows power users keep installed
One-click scans. No signup required.
4. Inspect the adapter with ipconfig /all
In the same Command Prompt window, run:
ipconfig /all
Find the adapter that is actually connected—Wi-Fi or Ethernet—and verify that it has an IP address, a default gateway, and DNS-server entries. Microsoft recommends this as the first client-side DNS check. An adapter with no valid address or gateway cannot reliably reach the configured resolver, regardless of what Minecraft displays.
If several adapters are listed, such as a VPN or virtual machine interface, make sure you are evaluating the connection carrying your game traffic. Disconnecting a VPN temporarily can help identify whether it is affecting the resolver path, but do not change security settings permanently without understanding the consequence.
5. Clear a stale Windows DNS cache
If an earlier lookup returned “Name does not exist,” Windows may still have that negative response cached. Run:
ipconfig /flushdns
Microsoft documents this command for clearing the DNS resolver cache. After it completes, run nslookup again and retry the server in Minecraft. Flushing the cache does not alter worlds, saves, server files, or your Minecraft account; it only removes locally cached name-resolution results.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
6. Compare another network
Connect through a phone hotspot or another network and test the same hostname. If it resolves there but not on your normal connection, the evidence points to the original network’s DNS path, VPN, security software, or resolver cache. Send the owner the exact nslookup output and tell them which network succeeded; that is more actionable than reporting only the in-game sentence.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
If the hostname fails on every network while the numeric address works, the owner should inspect the DNS record. If both forms fail everywhere, the owner should verify that the server is running and listening on the advertised port.
Why can I join by IP but not by hostname?
A numeric address bypasses hostname lookup. When the IP works, Minecraft has already reached the server’s network endpoint, so changing authentication, whitelist, or game-version settings will not repair the hostname. The likely causes are a missing or outdated DNS record, a typo in the friendly address, or a resolver that has not received the new record yet.
Ask the owner to compare the hostname’s DNS record with the server’s current public IP. A changed public IP leaves players pointed at an old or nonexistent destination until the record is updated. While that is being corrected, continue using the direct IP:port if the owner confirms that address is current.
The reverse case is also informative. If the hostname resolves but the numeric address does not connect, the name may point to an old server, the supplied IP may be stale, or the service may be unavailable at the advertised port. The owner must check the endpoint, not just the spelling.
How does a server owner fix the hostname?
Confirm the DNS record and public IP
Check the DNS record for the exact hostname players enter and confirm that it points to the server’s current public IP. Updating a server’s public address without updating DNS produces the same player-facing error or sends players to the wrong destination. Verify the record from the owner’s DNS provider and with an independent nslookup result before telling players to retry.
Verify the advertised port
For Java servers, server-port is 25565 by default, according to the Minecraft Wiki figure quoted in ForgeWorld Gaming’s guide updated 20 October 2026. A particular host can use another port, so players must receive the actual configured value. The hostname and port are one connection target; a correct record paired with the wrong port still prevents a successful join.
Forward the port when the server is behind NAT
If the server is on a private network behind a router, forward the configured Minecraft port to the machine running the server. The forwarding rule must match the port players are given. A hostname can resolve perfectly while the connection still fails because the router sends no traffic to the server.
Also popular on Amazon
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Leave server-ip empty unless a specific bind is required
ForgeWorld’s current configuration guidance recommends leaving server-ip blank so the server listens on all available addresses. Binding it to an incorrect or obsolete local address can prevent the process from accepting connections even when DNS and forwarding are correct.
Check that the process and firewall permit connections
Confirm that the server is running, that it has finished starting, and that the host firewall permits the configured port. If neither the hostname nor the direct IP reaches the server, these checks take priority over DNS changes. A hostname error should not be “fixed” by changing authentication or whitelist settings, because those controls are evaluated after the address has been resolved and contacted.
Allow time after creating or changing a friendly address
New or changed DNS records are served through caches. Akliz support guidance says users can wait about 30 minutes for a newly created friendly address or connect with the ip:port shown in its Command Center. Treat 30 minutes as that provider’s approximate guidance, not a universal DNS guarantee: the actual interval depends on cached records and their expiration. Give players the direct address while the hostname catches up.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsWhat is different about self-hosted and managed server setups?
The diagnostic logic is the same, but responsibility is divided differently. In a self-hosted setup, the owner controls the public IP, DNS record, router, server configuration, and firewall. A managed setup generally exposes a current connection address in its control panel, while the provider handles more of the underlying network; the owner still needs to give players the correct port and report a stale friendly address.
| Area | Self-hosted server | Managed hosting |
|---|---|---|
| Address maintenance | Owner updates DNS when the public IP changes. | Owner uses the provider’s current connection address while a friendly hostname updates. |
| Port exposure | Owner configures NAT forwarding and the host firewall for the configured server-port. |
Provider supplies the connection endpoint; the owner still distributes the correct port. |
| Recent hostname changes | Owner waits for resolver caches after changing the record. | Akliz advises waiting about 30 minutes for a newly created friendly address or using the ip:port in Command Center. |
Do not infer that a managed host is offline merely because its friendly name fails. Test the provider’s direct address first and use the provider’s status or support channel if that endpoint also fails.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How do I distinguish hostname errors from connection errors?
The wording tells you which stage failed. Use the table below to choose the next check rather than applying every possible fix.
| Message or symptom | Stage that failed | Best next checks |
|---|---|---|
Can’t resolve hostname / UnknownHostException |
The hostname did not become an IP address. | Check spelling, run nslookup, inspect DNS, flush the Windows cache, and compare another network. |
| Connection refused | An address was reached, but the remote service rejected the socket connection. | Check that the server is running, listening on the advertised port, and not blocked by a firewall. |
| Timed out | The connection path did not complete. | After confirming the address, check routing, firewall rules, and NAT port forwarding. |
| Incompatible version, whitelist, or authentication message | Name resolution and initial connection succeeded. | Follow the server’s version, access-control, or account instructions; DNS is no longer the blocker. |
Oracle describes ConnectException as a socket connection error, typically because no process is listening at the remote address and port or the connection was refused. That is fundamentally different from an UnknownHostException, which occurs before Minecraft has an address to contact.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
What information should I send the server owner?
A concise diagnostic report lets the owner reproduce the right layer of the problem. Include:
- The exact hostname and port you entered, with personal information removed.
- Whether the numeric
IP:portworks. - The complete
nslookup hostnameresult, including the DNS server shown. - Whether
ipconfig /allshows a valid address, gateway, and DNS entries on the active adapter. - Whether
ipconfig /flushdnschanged the result. - Whether the hostname works on a phone hotspot or another network.
- The time the owner created or changed the hostname, if known.
These details tell the owner whether to correct a record, wait for caches, or investigate the server’s port and firewall. They are more useful than screenshots that show only the Minecraft error line.
Frequently Asked Questions
Can I keep using the numeric IP instead of the hostname?
Yes, provided the owner confirms that the IP and port are current. A numeric address can stop working when a self-hosted server’s public IP changes, whereas a maintained hostname can continue to point to the new address after its DNS record is updated.
What should I include when reporting this error to an administrator?
Send the exact address, whether the direct IP works, and the output of nslookup. Also state whether the hostname works on another network and whether flushing the Windows DNS cache changed anything; those comparisons identify whether the issue is local or server-wide.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteDoes flushing DNS delete Minecraft worlds or server data?
No. ipconfig /flushdns clears Windows’ cached name lookups only. It does not remove saves, alter server files, or reset Minecraft settings.
Why does a server address sometimes include a port after a colon?
The port identifies the service endpoint on the server. Java commonly uses 25565 by default, but an owner can configure another value, so enter the exact hostname:port supplied and do not replace the colon with a semicolon.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

