I have a namecheap domain which is now connected to cloudfare nameservers but I need it to do one thing which doesn’t require me to buy 2 domains. I have set my IPV4 as 2 A records with different names but I want the the subdomains to both go to different ports e.g.
fn.domain.com will go to 1.1.1.1:7777 mc.domain.com will go to 1.1.1.1:25565
You will need to configure your hostname to port mapping at your origin. This is normally accomplished using a reverse proxy. The network ports article shared in the previous reply is important to read.