DNS: How to map domain to IP:PORT, not just IP?
I have 2 Web Sites and 1 Web Application (WCF Service). I also have one domain, managed by opensrs.net.
I didn't have any problems mapping the sites to the domain, via DNS -> CNAME.
*.abcd.com -> abcd.host.com
play.abcd.com -> abcd.otherhost.com
However, I'm having problems mapping the Web Application.
api.abcd.com -> abcd.otherhost.com:8081
I searched the net, and someone suggested that I should use DNS -> SRV.
api.abcd.com -> Priority: 1
Weight: 1
Port: 8081
Host: abcd.otherhost.com
Still didn't work.
Solution 1:
You can't do this via DNS in a reliable way as the use of SRV records for HTTP is not widespread.
The normal way to do this is to use a reverse proxy to proxy requests to the relevant ports.