Take the 2-minute tour ×

I have a web app with a site collection at http://portal I want to make a new site collection in this web app but with a host header like demo.portal Is there a demo somewhere on how to do this ? Thank's

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

you should do the following:

1) edit your hosts file (C:\windows\system32\drivers\etc) and add the following rule:   demo.portal

2) Add a site collection to your host headered webapplication - New-SPSite $url -HostHeaderWebApplication $WebApplicationUrl -OwnerAlias $Owner -Name $Name

3) Edit your iis bindings: Add the "demo.portal" binding to the webapplication that your site collection resides in.

4) Disable your local loopback adapter: New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck -value "1" -PropertyType dword

share|improve this answer
HI I've made all your steps but it ask's me for credentials and even I'm the owner I can't have acces. –  user3145 Aug 31 '11 at 13:37
When you edit your hosts file, either run Notepad as an administrator and drag the hosts file into it, or copy the hosts file, edit the copy, then overwrite the original. You won't be able to edit the hosts file by just opening it and hitting save, since it's a "live" file being used by the OS. You also have to be a local administrator on the box to edit the IIS configuration and set the registry item for the loopback check. –  webdes03 Aug 31 '11 at 14:43
add comment

Your Answer


