SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. 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 was wondering which answer is more correct? I picked new-spsite but my answer is marked incorrect.

enter image description here

share|improve this question
up vote 1 down vote accepted

Answer D is the correct one :)

Either you can specify an alternate access mapping (AAM) during site collection creation, Or you can use host header approach while creating new web application. I don't see any other option except D.

share|improve this answer
To expand on this, you can use New-SPSite to create host headed site collections, but for this to work the underlying web application cannot have an IIS level host header, which the wording of the question indicates exist. Ref: (this one tripped me up for a while too) – GavinB Jul 10 '12 at 1:47

The issues is that the Web Application already has been created using Host-Header, which forbids creating Host-Named Site Collections, here is and excerpt "

It's important to understand the distinction between these two levels. Host headers at the IIS Web site level are only intended for path-based site collections. Host headers at the site collection level are only intended for host-named site collections. In most cases, applying a host header binding at the IIS Web site level makes it impossible to access host-named site collections through the IIS Web site. This is because IIS will not respond to requests for host names that differ from the host header binding."

Therefore you cannot create directly a Host-Named Site Collection, but rather rely on AAM, see more here:

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.