How can I use cloudflare to point my subdomain, to another domain with port?

Me and a friend are having issues making a website's subdomain redirect to a minecraft server's ip and port. The domain twangcraft.quakz.host needs to redirect to de-01.quakz.host:25893 with ports and everything, so going directly to twangcraft.quakz.host it takes people into the minecraft server hosted on de-01.quakz.host:25893. We tried a lot of things, the ip and port is from a node on a pterodactyl panel and using page rules to redirect to that, requires an ip and using the ip would result in it using the wings for the pterodactyl panel instead for the minecraft server's address. Basically, we were planning on making the subdomain twangcraft.quakz.host connect to the raw pterodactyl server's url (de-01.quakz.host:25893), then connect that to my infinityfree website using a cname. Which as a result becomes play.twangcraft.rf.gd which then people can use to join my minecraft server. Anyone know how we can make this work?
5 Replies
Chaika
Chaika4mo ago
You want a specific port, so SRV Records are your answer. I'm assuming Java, this won't work with bedrock. This is a minecraft specific thing as well. Make the following record in the quakz.host domain (Edit: in screenshot below) side note: Page rules/proxy will never work with Minecraft as CF's normal proxy is http only If you wanted it on your other website, your cname name _minecraft._tcp.play.twangcraft.rf.gd, same other attributes
Chaika
Chaika4mo ago
No description
Twangy Money
Twangy MoneyOP4mo ago
Thank you soo much for your answer, say what does the _minecraft._tcp. at the beginning do and why is it necessary for both the cname and the srv record?
Chaika
Chaika3mo ago
It's the Service record format. the service name is minecraft and the protocol is tcp. Minecraft specifically supports SRV records, they do a lookup of the srv record first before trying to resolve the raw name a/aaaa/following cname.
why is it necessary for both the cname and the srv record?
You don't need the cname on play.twangcraft.rf.gd, just the srv. You could point the CNAME (or any a/aaaa records) to anything you'd like for web clients to use, maybe redirecting to your own website or whatever. The nice bit about service records is you're telling a specific service to go somewhere else without modifying the underlying hostname
Twangy Money
Twangy MoneyOP3mo ago
Interesting, thanks again for the help. Once our guy is back from the hospital (I heard he was coughing up blood we all pray for him) we could test this out, after we do I'll mention you in this post about it, or if we face issues maybe.
Want results from more Discord servers?
Add your server