Minecraft – “Cannot Resolve Hostname” when using Subdomain

minecraft-java-editionminecraft-java-edition-servertechnical-issues

A group of friends wanted a Minecraft server to play together on, so I went ahead and deployed a VPS, and directed an A record titled play to the server's public IP address. I connected to the server via SSH using play.coffeehousecode.com as the hostname, and didn't encounter anything out of the ordinary, so I started a Minecraft Server instance, and the logs showed no problems to report.

However, when trying to connect to the server using the Minecraft client, I receive an error stating that the Hostname couldn't be Resolved. I checked my DNS records to make sure everything checks out, and SSH-ed into the server again without a problem. When connecting to the server using it's public IP address, however, I can connect and play without a problem.

Any ideas as to what could be causing this?

Best Answer

I'm going to make an educated guess and say you told them the new address mere minutes after creating the A record, right? That's the source of the problem.

DNS changes take time to propagate across the Internet due to caching and Time To Live rules. If you told them to connect right after you created the A record, it would not yet exist in their ISP's DNS servers.

For reference, I can ping your new subdomain successfully and I can connect to it using Minecraft (though it immediately kicks me out because it's whitelisted), so your friends should be able to connect now or soon, unless they use an ISP that is particularly slow to update their records.