Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an web application server running tomcat and i need to publish my APIs to internet users. However I don't have a domain name for this server and I can only put the ip address of this server (e.g. 145.XXX.XXX.XXX) to point out where my API xml files are located.

I have another web server running with a domain name "http://www.webserver.com" registered on the internet and I want to make use of its domain name to server my web application server API xml files location. How can I do that? using "www.webserver.com/api" or using "api.webserver.com"? which is better?

Also I wonder if I want to publish a "rstp://145.XXX.XXX.XXX" web link for video streaming purpose, can I use "rstp://www.webserver.com/api" to replace it and how to do it? I always thought the url contain domain sub-directory name cannot point to another IP address, it only can point to another folder location on the webserver itself.

share|improve this question
up vote 1 down vote accepted

I don't think you can do this with a subdirectory, since you'd only be able to do a redirect and that is not what you require. As you mention, a sub directory cannot point to another IP address.

However, you could perhaps use a subdomain, of the form http://api.webserver.com and set up a DNS "A" record for this subdomain in the webserver.com DNS zone that points to the alternative IP address. For example:

api.webserver.com. 14400 IN A 145.XXX.XXX.XXX
share|improve this answer
Actually I thought the same way but I just need a bit confirmation on this. Looks like I have to convince my IT network team to give me a subdomain address then. – Xianlin Apr 15 '12 at 15:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.