Server Fault is a question and answer site for system and network administrators. 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

As the title suggest, I was wondering if there is a technical reason behind naming a web application's documentroot with the domain name? From my limited experience, it seems that including the domain name would be useful only in circumstances where you host multiple sites of the same name under various domains (,, etc). When that is not the case, /var/www/example is fine.

share|improve this question

closed as unclear what you're asking by Tom O'Connor Aug 14 '13 at 22:12

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

I think it's really a case of personal preference, unless the company you work for has an existing standard convention for this.

If the sites all belong to one domain, you might want to use the name of the virtual host (e.g. www or shop), but if you're hosting multiple domains, you might choose the use the FQDN.

It's really up to you, but try to use a convention that you can consistently use for all the virtual hosts you are going to be using.

share|improve this answer

.. at the end of the day you can name it this way or another, as long as you can find whatever you're looking for later on you should be OKAY)) there is no difference as far as apache pulling files to serve them to end-user, so it's all about "organizing skills".

share|improve this answer

There is no difference, it's just a directory name. It's just easier to recognize what domain is it serving if you use domain names. That's it.

share|improve this answer

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