I originally had setup a Minecraft server on ClanForge and it is a great service. I setup my DNS records to make it easier to add the server into the Minecraft. I wanted the server name to be minecraft.woicik.com even though it was hosted at ClanForge. I did some research and figured out I needed the following DNS records:
- “A” record of “mc” pointing at the IP address ClanForge provided.
- “SRV” record of “_minecraft._tcp.minecraft” with values of:
- Priority – 0
- Weight – 5
- Port – 28865
- Target – mc.woicik.com
But, for an Azure VM if you turn off the server, the IP address is lost and will be re-assigned a new IP address the next time the server starts. I could create an instance-level public IP address in Azure but wondered if I could do something with the assigned DNS name of VM which is mgw-minecraft.cloudapp.net.
So, the first step I did was delete the A record of “mc”. I then created a CNAME record of “mc” pointing at mgw-minecraft.cloudapp.net.
Then, I change the SRV record to have a port of 25565 which is the default Minecraft port.
I created a new server in the Minecraft client with the server name of “minecraft.woicik.com” and it worked.