Setting Up a My Site Host On a Non-Root Site Collection


There are a number of reasons you may need to set up My Sites under an existing web application, rather than its own standalone web application. However, most of SharePoint's public documentation assumes your My Site Host will be on its own web app. It's completely supported to have the My Site Host under a different web application, but there are a few gotchas that can confuse or frustrate an admin when setting this up for the first time. Is this article, I'll go over the steps for configuring My Sites beneath the Site Collection of an existing web application.

In this article I'll be setting up a My Site Host on a farm as follows:

URL of web application: http://spsa2013
URL of My Site Host: http://spsa2013/sites/MySites
URL for each user's My Site: http://spsa2013/sites/MySites/personal/username

We'll assume that a site has already been set up on http://spsa2013. It is a requirement that all web applications have a root site.

Creating the My Site Host

You'll create the My Site Host in the standard way via Central Admin -> Application Management -> Create Site Collections

In my example, you can see that I picked the spsa2013 Web Application, chose /sites/MySites for the URL, and selected the My Site Host template. You'll also need to choose a Primary Site Collection Administrator, then click OK.

Setting up Managed Paths

On the Web Application hosting the My Sites, we'll need to set up one new Explicit path for the My Site Host and one new Wildcard path for the individual My Sites to be placed under. It is critical that this is set up correctly. This is accomplished from Central Admin -> Manage Web Applications -> Managed Paths:

The distinction here is that the My Site Host path (sites/mysites) has an explicit inclusion (since there is a site collection located at this URL) and the Personal path gets a wildcard inclusion (since there are site collections under this URL but no site at the sites/mysites/personal URL itself).

Setting up Self-Service Site Creation

This is handled from Central Admin -> Manage Web Applications -> Self-Service Site Creation:

On this screen you need only to set Site Collections to On. You don't need to be concerned about the URL that is displayed, this is not used when My Sites are created. Additionally, if you have set up Quotas, you can select a quota to be used for My Sites at this time.

Configuring The My Site settings in the User Profile Service Application

The final step is accomplished via the User Profile Service Application, Central Admin -> Manage Service Applications -> User Profile Service Application. Then select Setup My Sites from the My Site Settings section on the bottom of the screen.

Important items to note:

  • While the text box is not large enough to display the entire URL, note that the My Site Host location is set to the full My Site Host path we set up previously: http://spsa2013/sites/MySites/
  • In the Location field, you must include the full path specified when you created the wildcard Managed Paths, in this case sites/MySites/Personal. If you only put Personal in the field, SharePoint will attempt to create the My Sites at http://spsa2013/personal, and My Site creation will fail.

If you had previously entered invalid values or are changing the My Site location, you may need to restart the SharePoint Timer Service, as well as the User Profile Service Application app pool, for the changes to take effect. You should also exit and reopen your browser as the My Site URL can be cached.

Errors to look for

If the Managed Paths or Personal Site Location are not set up correctly, you may end up seeing something like the following in the Event Viewer logs. Note the incorrect URL path in the String1 parameter of the first message:

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

- <System>
  <Provider Name="Microsoft-SharePoint Products-SharePoint Portal Server" Guid="{8B3DDD3D-2B09-4669-BF81-E2D6921FEEEA}" />
  <EventID>5187</EventID>
  <Version>16</Version>
  <Level>2</Level>
  <Task>1</Task>
  <Opcode>0</Opcode>
  <Keywords>0x4000000000000000</Keywords>
  <TimeCreated SystemTime="2018-04-10T16:53:56.804161400Z" />
  <EventRecordID>358614</EventRecordID>
  <Correlation ActivityID="{D4BBDA58-99F3-4987-BB17-684A7AD188DE}" />
  <Execution ProcessID="6868" ThreadID="4336" />
  <Channel>Application</Channel>
  <Computer>spsa2013.contoso.com</Computer>
  <Security UserID="S-1-5-21-2101011316-2865436131-4185517455-1104" />
  </System>
- <EventData>
  <Data Name="string0">CONTOSO\Administrator</Data>
  <Data Name="string1">http://spsa2013/personal/administrator</Data>
  <Data Name="string2">Microsoft.Office.Server.UserProfiles.PersonalSiteCreateConfigurationException: A failure was encountered while attempting to create the site, wildcard inclusion used to create personal sites does not exist. at Microsoft.Office.Server.UserProfiles.MySiteInstantiationManager.<>c__DisplayClass2c.<CreateSite>b__28() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at Microsoft.Office.Server.UserProfiles.MySiteInstantiationManager.CreateSite(String strSiteRelative, String strSiteFullUrl, Int32 overrideCompatLevel, Int32 lcid, SPContentDatabase contentDatabase)</Data>
  </EventData>
  </Event>

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

- <System>

  <Provider Name="Microsoft-SharePoint Products-SharePoint Server" Guid="{C33B4F2A-64E9-4B39-BD72-F0C2F27A619A}" />
  <EventID>8100</EventID>
  <Version>16</Version>
  <Level>2</Level>
  <Task>35</Task>
  <Opcode>0</Opcode>
  <Keywords>0x4000000000000000</Keywords>
  <TimeCreated SystemTime="2018-04-10T16:53:56.804161400Z" />
  <EventRecordID>358615</EventRecordID>
  <Correlation ActivityID="{742A5C9E-6B76-7076-A542-0086007690C4}" />
  <Execution ProcessID="6868" ThreadID="4336" />
  <Channel>Application</Channel>
  <Computer>spsa2013.contoso.com</Computer>
  <Security UserID="S-1-5-21-2101011316-2865436131-4185517455-1104" />
  </System>

- <EventData>

  <Data Name="string0">CONTOSO\Administrator</Data>
  <Data Name="string1">742a5c9e-6b76-7076-a542-0086007690c4</Data>
  <Data Name="string2">0</Data>
  <Data Name="string3">28cae970-9721-4876-8dfb-e5c049c4a030</Data>
  <Data Name="string4">Microsoft.Office.Server.UserProfiles.PersonalSiteCreateConfigurationException: A failure was encountered while attempting to create the site, wildcard inclusion used to create personal sites does not exist. at Microsoft.Office.Server.UserProfiles.MySiteInstantiationManager.<>c__DisplayClass2c.<CreateSite>b__28() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at Microsoft.Office.Server.UserProfiles.MySiteInstantiationManager.CreateSite(String strSiteRelative, String strSiteFullUrl, Int32 overrideCompatLevel, Int32 lcid, SPContentDatabase contentDatabase) at Microsoft.Office.Server.UserProfiles.MySiteInstantiationManager.CreatePersonalSiteWithSQM(SPSite mySiteHost, String mySitePortalUrl, Int32 overrideCompatLevel, Int32 lcid, SPContentDatabase contentDatabase) at Microsoft.Office.Server.UserProfiles.MySiteInstantiationManager.<>c__DisplayClass23.<CreateMySite>b__1f() at Microsoft.Office.Server.UserProfiles.Helpers.RunWithUserProfileIdAsCorrelation(Guid userProfileId, CodeToRunWithCorrelation delegateToRunWithCorrelation) at Microsoft.Office.Server.UserProfiles.MySiteInstantiationManager.CreateMySite(Int32 lcid, SPContentDatabase contentDatabase) at Microsoft.Office.Server.UserProfiles.SiteInstantiationWorkItemJobDefinition.ProcessWorkItemCoreInternal(SiteProvisioningTimerJobContext jobParameters, DateTime timeNow, UserProfile userprofile) at Microsoft.Office.Server.UserProfiles.Helpers.RunWithUserProfileIdAsCorrelation(Guid userProfileId, CodeToRunWithCorrelation delegateToRunWithCorrelation) at Microsoft.Office.Server.UserProfiles.SiteInstantiationWorkItemJobDefinition.ProcessWorkItemCore(SiteProvisioningTimerJobContext jobParameters) at Microsoft.Office.Server.UserProfiles.SiteInstantiationWorkItemJobDefinition.ProcessWorkItem(SiteProvisioningTimerJobContext timerJobCtx)</Data>
  </EventData>

  </Event>

Comments (1)

Skip to main content