unable to connect to different subdomains with srv records
I'm trying to set up different subdomains in my DNS that all point to different ports on the same IP (multiple services hosted on the same PC).
play.mydomain.com is the minecraft server, port 25565
host.mydomain.com is the minecraft server admin panel, port 25560
map.mydomain.com is the live map for the minecraft server, port 8100
Out of all these records, the only one that I can connect to is the play.mydomain.com in minecraft. Going to the other two doesnt work, however connecting directly to their IP:Port works.
FYI in the image blue = the IP, red = my domain.
Any help is appreciated. I've been at this for a few hours and it feels like a brick wall.
8 Replies
Minecraft servers cannot be proxied by Cloudflare, at least not with a proxied record. You need to unproxy it if you want it to work
Also note that SRV records need to be specifically supported by the application. If you want to access them using a web browser, you cannot use SRV records
odd because thats the only record currently working. might be connecting through an old record though, im unsure.
since web browsers dont support SRV records how would I have subdomains for different services on the same IP but with a different port?
re: the Minecraft record: I assume it will be because it is cached. If you've had it unproxied recently, that's almost certainly it.
You should set up a reverse proxy, like nginx, that listens on a standard and decides which service it has to go to locally using the hostname.
Thanks for your help. I'll look into that now
Alternatively, you can also set up origin rules with a port override: https://developers.cloudflare.com/rules/origin-rules/
Origin Rules (beta) ยท Cloudflare Rules docs
Origin Rules allow you to customize where the incoming traffic will go and with which parameters. Currently you can perform the following overrides:
That might be a bit easier. I thought that was enterprise-only, but port override is support on all plans
Awesome, thanks ๐
for future reference if people are facing my same issue, this works like a charm. thanks ๐
Good to hear! ๐