Minecraft server and website on different IP's

I had been hosting a minecraft server for a few years. I decided to switch to Cloudflare and ad a website. I am not a “computer person”, but I can generally figure things out with the help of “The Google”.

My problem is this:
the server is hosted on 111.111.111.111 and the website is hosted on 222.222.222.222. How do I set this up so that mc.minecrafterservername.com goes to 111.111.111.111 and www.minecraftservername.com goes to 222.222.222.222.

Thanks!

Hi @andrewdeanbadi,

I hope you’re well!

First go to the DNS tab in the Cloudflare dashboard. There you’ll have to add an A record for mc.minecrafterservername.com pointing to 111.111.111.111. Make sure the proxy toggle is set to DNS only :grey: or it will not work.

Then add an A record for www.minecraftservername.com pointing to 222.222.222.222. Here the proxy toggle should be set to Proxied to ensure your website is protected by Cloudflare.

Feel free to reply if you have any more questions or run into any issues :slightly_smiling_face:

Thanks for your reply.

I can not make the second A record for 222.222.222.222 as there is a CNAME record with “www”.

If the ‘www’ CNAME points to the naked domain, you can leave it. Otherwise, delete it and add the “A” record instead.

It is the naked domain. it is “minecraftservername.com

However, should I delete that cname, then there is no logical name for “minecraftservername.com”. How would it know to link “www.minecraftservername.com” to 222.222.222.222?

You should have the following DNS records:
A mc.minecraftservername.com -> 111.111.111.111 :grey:
A minecraftservername.com -> 222.222.222.222 :orange:
CNAME www.minecraftservername.com -> minecraftservername.com :orange:

1 Like

I did not read your post correctly, @sdayman. I should leave it… but then what do I do about the A record? I can not add it with the CNAME www.

This is exactly what I have right now.

If I go to www.minecraftservername.com, I get the web page for the server, not the website. Prior to trying to add the mc.minecraftservername.com, I was getting the website correctly.

Maybe it needs a few minutes to update?

A quick and easy fix would be this Page Rule (Under the Rules tab):

Well, the website is back to displaying properly. However, the server is not being acknowledged by clients.

I read How to successfully make Minecraft DNS working.
It says I need to make an A record with @ then a CNAME with MC or PLAY.@. Will making an A record @ mess up the existing website? I do not know what that @ A record actually does.

An “A” record points to a physical server. A CNAME means to look up the “A” record of the target, and use that IP address.

Let’s go back to here. I have this from @albert .

First go to the DNS tab in the Cloudflare dashboard. There you’ll have to add an A record for mc.minecrafterservername.com pointing to 111.111.111.111 . Make sure the proxy toggle is set to DNS only :grey: or it will not work.

Then add an A record for www.minecraftservername.com pointing to 222.222.222.222 . Here the proxy toggle should be set to Proxied to ensure your website is protected by Cloudflare.

Feel free to reply if you have any more questions or run into any issues :slightly_smiling_face:

Now, what do I add to the SRV record so it finds the minecraft server?

Is your server not running on the default port (25565)?

For a tutorial on doing an SRV record you can look here: Creating DNS Records in Cloudflare for a Minecraft Server

OMG.

My server was stopped.

pulling my hair out

I started server and all is well.

I apologize for being so dense! Looks like all is well now.