-1

I have a minecraft server and I want to make it so example.com points to two IP addresses. I want to know how to make it. So, apache, godaddy, or whatever detects a browser and sends it to the website version and when a client is being detected it sends it to the minecraft server.

For example:

I type example.com in my browser and it takes me to the website.

I type example.com in my minecraft server list and hit enter and it shows my minecraft server.

Thank you.

ketan
  • 19,129
  • 42
  • 60
  • 98
PlayinCODMC
  • 5
  • 1
  • 4
  • The question is duplicate: [is-it-possible-that-one-domain-name-has-multiple-corresponding-ip-addresses][1] [1]: http://stackoverflow.com/questions/10257969/is-it-possible-that-one-domain-name-has-multiple-corresponding-ip-addresses – Sasan007 Jun 02 '14 at 04:31
  • Can't be done. If you need different IP addresses you'll need different names for them. There's nothing to stop you using, for example, www.example.com with one address and minecraft.example.com with the other, though. –  Jun 02 '14 at 04:35
  • How does mineplex.com do this though? The IP is mineplex.com and the website is mineplex.com – PlayinCODMC Jun 02 '14 at 17:25

2 Answers2

0

They do this by adding specific entries to your DNS record. By setting an SRV record you can forward all requests on a specified port to a separate target which may be another domain, a sub-domain, separate directory, or another IP address.

Example SRV record:

_http._tcp.example.com. IN SRV 0 5 80 www.example.com.
_minecraft._tcp.example.com IN SRV 0 5 25565 play.example.com.

In the above example you could also replace the domains used at the end of either record with a separate IP address and it would also work.

Of course your exact method of adding these records depends on who is the host that is controlling your DNS records and what method of edit they offer to you.

-1

You can't use a domain for two IP addresses. However, It is possible to have a web server on the same network. That way the domain name should work with the web server and your minecraft server.

Cody
  • 1
  • 1