Pointing a domain name to my home server on a port other than port 80

4

I have an application running on my home server on port say 8050. After registering my domain , how do I point it to my static IP. Right now I am using http://XX.XXX.XXX.XX:8050/

How do I make the domain name automatically forward the request to the port 8050 on GoDaddy.

Thanks

Freelance

Posted 2012-08-15T11:06:49.267

Reputation: 51

Question was closed 2012-08-15T13:31:24.347

2Why was this question downvoted? – amotzg – 2012-08-15T12:43:21.360

Answers

3

A Domain Name will simply resolve to an IP and has nothing to do with the port the request will actually be sent to. The port end point on the host is defined as another part of the URL.

See Wikipedia for Domain Name Purpose:

Domain names serve as humanly-memorable names for Internet participants, like computers, networks, and services. A domain name represents an Internet Protocol (IP) resource. Individual Internet host computers use domain names as host identifiers, or hostnames. Hostnames are the leaf labels in the domain name system usually without further subordinate domain name space. Hostnames appear as a component in Uniform Resource Locators (URLs) for Internet resources such as web sites (e.g., en.wikipedia.org).

And for URL syntax:

Every URL consists of some of the following: the scheme name (commonly called protocol), followed by a colon, two slashes,[note 1] then, depending on scheme, a server name (exp. ftp., www., smtp., etc.) followed by a dot (.) then a domain name[note 2] (alternatively, IP address), a port number, the path of the resource to be fetched or the program to be run, then, for programs such as Common Gateway Interface (CGI) scripts, a query string,[7][8] and an optional fragment identifier.

What you might do is install a small proxy server (e.g. http://www.gcd.org/sengoku/stone/) and put your traffic through to the server running on 8050.

As you said you were running this application on a "Home Server", is it behind a router which might do the port forwarding? That would be the simpliest solution.

stex

Posted 2012-08-15T11:06:49.267

Reputation: 943

Hi Thanks for replying. The server is behind a router and it does the forwarding and hence the 'http://myStaticIP:8050/' works. Basically its a java webs start application. But I onl wish to avoid the myStaticIP in dot format and put a name to it. Should I then use something like this 'http://myDomain:8050/'

– Freelance – 2012-08-15T11:28:21.860

If the router can forward its port 8050 to your server's port 8050, you should be able to change this setting to make it forward its 80 to the server's 8050. Or am I getting you wrong? I think it would still handle requests from inside the local network itself (so show you the web interface) and just forward external requests on :80 – stex – 2012-08-15T11:30:07.073

I thought all http requests are automatically forwaded to port 80 and I do not want to touch that setting as I might have some websites on the server. I only wish to specifically forward certain requests port 8050 where the application is running like here http://XX.XXX.XXX.XX:8050/

– Freelance – 2012-08-15T11:33:38.017

A request can not be routed to a specific port by means of Domain name definition. The domain name is another part of the URL. The port to be used can either be deduced from the URL scheme or read from an explicit port definition after the host name. (e.g. by default HTTP use port 80 but the resource at foo.bar.com:8045 can also "talk" HTTP) – amotzg – 2012-08-15T11:43:37.457

Hi Thanks again. I think that kind of answers my question. I will check that out as I have some spare domains parked and see if it works. – Freelance – 2012-08-15T11:52:42.500