Reputation: 9381
Maybe I ask this question in a weird way, but I'll explain my goal here:
I'd like to let my domain example.com point to my ip 1.2.3.4.5:42, so for example (not the real reason) if I have a Minecraft server hosted at home on port 42, people don't have to typ example.com:42, but just typ example.com. I know normally it points to port 80, but I know for a fact that what I try to accomplish is at least possible.
I myself use Windows server 2012, but for future use and other users maybe it's a good idea to try answering this question for both Windows and Linux.
Subquestion: Why shouldn't I run my application on port 80, just like Teamviewer does?
Upvotes: 0
Views: 1252
Reputation: 339816
You can't - DNS entries (with the exception of SRV
records) have no concept of port-numbers.
If your actual application is HTTP rather than Minecraft you can use a 3xx
redirect code from a web server running on the default port to push users to the non-standard port. However most other protocols don't actually have any such redirect mechanism.
Upvotes: 3