Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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've been arguing for some time about this topic, now I'd like the opinion of professionals.

My point is that a domain should be made of 2 or 3 levels at most, like:

  • mysite.com
  • blog.mysite.com

And I sustain that the "www" third level is useless and should be "optional" meaning that if you type www.mysite.com it will silently redirect to mysite.com, but that's not the focus of this topic.

What is really troubling me is the fact that sometimes I have to work with domains 5 levels long for testing purposes, like this:

  • www.customersite.com.webagency-test.com

Instead of a more natural and meaningful

  • test.customersite.com

Other than the ugliness, I have troubles making those kind of host names work. Sometimes in IIS7 they would simply not work, as if the host header wasn't even configured.

I think that those kind of 5 level host headers are also violating some rule, or standard, or best practice, although I'd like more information about this.

So, my dear experts, is this wrong as I think, or it's just "horrible but not wrong per se", or something else?

share|improve this question

migrated from programmers.stackexchange.com Aug 24 '11 at 14:45

This question came from our site for professional programmers interested in conceptual questions about software development.

up vote 6 down vote accepted

There's nothing explicitly wrong with it. It's just a domain. It's as cumbersome as you choose to make it. Some legitimate concerns, however, would revolve around the testing of security and certificates, etc.

Since certificates are based on the TLD, it would be impossble to run tests against any web service that sits behind an SSL layer.

Similarly, cookies are also domain driven so it would be difficult to perform testing on cross domain applications unless there were explicit controls placed on the naming scheme. It isn't impossible, but it does become harder to manage.

share|improve this answer

I don't necessarily agree that a domain always has to be short. It depends a lot of how it is used. Let's say you're an agency having to show multiple projects to multiple customers, but not all these customers actually do have domains of their own, so something like supercooldemo.customer.com will not always be possible.

So, you'll probably end up with something like this:


This isn't all that differed from


I'm not a systems export and don't know what kind of configuration efforts are required to manage different subdomains, but from a user point of view I don't think there is much different in defining a path in a "real" path or doing so using domains.

share|improve this answer

There's no technical reason that a fully-qualified domain name has to be any number of parts, nor are there any rules about it. (RFC 1035 does specify that a single FQDN can't be any longer than 255 characters, but I've never seen anyone go that long for anything other than a gag.) If you're having difficulties resolving long names, consult with whoever provides your DNS.

Any arguments for or against are entirely aesthetic.

share|improve this answer

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.