-2

I have a Minecraft server with the ip of mc.s0l4re.com, the mc subdomain is an "A" DNS record that redirects anyone typing "mc.s0l4re.com" in Minecraft to my server. However I want to use this subdomain as a website for my server as well. I want to redirect anyone in minecraft who types in "mc.s0l4re.com" to my Minecraft server, but I want anyone using a web browser to be directed to the server website.

Thank you!

S0L4RE
  • 1

2 Answers2

2

The A record in DNS is an address mapping record that only resolves the name to an IP. DNS doesn't implement HTTP redirection: it's a feature of HTTP protocol i.e. performed by a web server.

If you are running a Minecraft server on its default port 25565 i.e. have server-port=25565 in your Server.properties, you have the default port 80 for HTTP (and 443 for HTTPS) available.

You can set up a web server (Apache, Nginx etc.) on the same server, having the same hostname for

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
0

Please clarify if the web server that will serve your site will be on the same machine as your minecraft server or on a different machine.

If on the same machine then you don't need redirect. Just setup a web server and put your website files there.

If website and minecraft server are on different machines then you must redirect to an other domain to display your website and the other domain must point to the web server machine.

atrias
  • 88
  • 5