Super User is a question and answer site for computer enthusiasts and power users. 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

This question already has an answer here:

I am building a Facebook app. Facebook requires I access sites by name and not by some address like But the testers are accessing the site like this now, i.e., by using this address This testing server is in our LAN. (Its address is and the port number is 7654, so everyone gets to that site when they type this address.)

Now I want everyone to be able to access that site by some domain name, such as, so that I could specify it in the app domain of Facebook. How do I do this?

I hope I am making myself clear. Please comment if it’s not clear.

share|improve this question

marked as duplicate by CharlieRB, Scott, Dave M, Canadian Luke, davidgo Apr 2 '13 at 20:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Thanks Scott for editing my post – John Doe Apr 1 '13 at 18:14

Since your users are pointing to, they are obiviously on your internal lan, and as such, you can install and configure a DNS zone on your internal network that applies a name to your site, so that they could use to access the application. This dns zone would only be accessible within your lan however, and no one on the outside will ever know it exists or recognize the name.

If I am understanding what you are saying about the facebook integration however, in the situation above, you could not tell FB that you are on, since as far as the public world is concerned that domain does not exist, or belongs to someone else. to FB, they couldn't really care less what your dns Name is, as long as they can query a public dns server to get its IP address, and as you describe it, that is not possible yet.

in order to have a dns name that you could give FB, you need to register it with a registrar like tucows, godaddy, etc, and set your server up to be accessed from the internet.

share|improve this answer
Thanks for clearing my doubt, as I was more concerned about the steps to tackle it, but anyway i should have provided more detail in my problem statement. All the systems are ubuntu systems. Given this is it necessary for me to install DNS zone, is it not possible for me to do some changes in hosts file, server apache configurations etc to achieve the same? I am a real novice please do not mind my ridiculously silly question. – John Doe Apr 1 '13 at 18:08
yes, you could use a host file if all you are worried about is internal resolution. – Frank Thomas Apr 1 '13 at 18:12
Thanks Frank Thomas. So its possible to achieve this just by making appropriate changes into /etc/hosts file. – John Doe Apr 1 '13 at 18:13
up vote 0 down vote accepted

First of all thanks to Frank Thomas for providing me with the direction in the first place. His answer is correct but even then I would like to add steps to achieve the solution of aforementioned problem.

This kind of problem of using some name can be solved on ubuntu systems by doing changes in the /etc/hosts file.

So if is the name of the site you want to give and is the site IP in LAN for that machine. Then in /etc/hosts of each machine that want to access the test server provide a line with the details.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .