For my current project, our site collections had each their own vanity URLs. See here for the definition of a Vanity URL. In our case, we had a set of site collections URLs, each pointing to a product such as:
- ProductA.company.com
- ProductB.company.com
- ProductC.company.com
In SharePoint 2007, using vanity URLs most of the time meant that you had to create your own HTTP module or buy some third party solution (or for free, see this project on codeplex). In SharePoint 2010, you can use a new feature called ‘Host-named Site Collections’ (see here for more details on msdn) to create vanity URLs, which simplify the whole process a lot. One limitation is that you will have to create your site collection through PowerShell and not through Central Admin.
Now, if you happen to have Claims Based Authentication enabled on your web application, you might have noticed that it’s not possible to create a host-named site collection for that web application. You will run into this error ‘New-SPSite : User cannot be found’:
It took me a while to figure out that the issue was coming from the fact that I was using a claims based authentication web application and that the claims were enabled at the time of the site collection creation. There is a quick way around that issue by going to central admin and disabling your trusted identity provider:
.. and go back to PowerShell and re-execute your command which will create your host-named site collection successfully this time:
use this next time with the NEW-SPSite cmdlet:
-OwnerAlias ‘i:05.t|SAML PROV|user@xxxx.ccc
it will work without disabling identity provider
-OwnerAlias ‘i:05.t|SAML PROV|user@xxxx.ccc’
(I’ve forgotten the ‘ at the end of the string)