Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I notice two types of design used in web applications, some with a particular subdomain for users contents, and some with same URL structure for all the accounts.

Ex: and for subdomains for sites like blogspot, wordpress, basecamp etc.

while in the other approach and the content is shown according to the user logged in, but the URL is same for every user.

What are main differences between both of these kind of design?

share|improve this question
Belongs on –  JB King Dec 11 '12 at 15:43
@JBKing Sorry, didn't know about that, how do I move this? –  Sathish Manohar Dec 11 '12 at 15:44
There should be a way for the moderators to move the question, though in the meantime, take a look on that SE and see if this has already been asked in a slightly different form. –  JB King Dec 11 '12 at 15:46
when you use a specific subdomain for static stuff (scripts and css) then a (malicious) user can preempt it (it happened to once) –  ratchet freak Dec 11 '12 at 16:00

1 Answer 1

up vote 5 down vote accepted

The server-side differences vary quite a bit from platform to platform.

In most cases, however, it is easier to write an application that assumes it runs in the root (at least in PHP and ASP.NET it is) and then set up separate sites/virtual directories for each.

From a user's perspective, telling them to go to is typically easier to remember than There is no reason this must be so, but most people have it more or less ingrained to ignore everything after the / or, for that matter, before the main domain. As a more esoteric example, if you were to tell end users to go to what most people will actually remember is, their minds discarding the "trash".

The downside is, of course, that provisioning subdomains is kind of manual out of the box. You can script it up, of course, but in IIS or Apache, as well as most domain registrars it tends to be done by hand. So, you have to go to the effort of automating that (though I am sure there are some extant tools that do the trick).

share|improve this answer
I'm using rails, it seems I can do some routes.rb trickery to dynamically use subdomains. Thanks for the insight :) –  Sathish Manohar Dec 11 '12 at 15:50

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.