I'm running a multi-site Sitecore 6.5 installation, upgrading to Sitecore 6.6. In 6.5, links to the top level domains behave normally, i.e. a link to the /sitecore/content/mydomain/home item resolves to mydomain.mysite.org, because it's set up to do so in web.config via the <sites>
entries.
After the upgrade to 6.6, that's not happening. The <sites>
entries are still in place, but the URL just points to mysite.org/sitecore/content/mydomain.home. Sitecore has been unable to pinpoint the issue because we have a number of customizations to the base setup (done by the initial vendor that set up the site). I'm assuming one of these customizations is to blame, but I'm having trouble pinpointing exactly where in the pipeline this is breaking down.
The actual code that's rendering the links is calling Sitecore.Links.LinkManager.GetItemUrl(), which is returning the bad URL immediately after the 6.6. upgrade package is installed. Any idea where the actual domain conversion is taking place, so I can start backing out some customizations to at least know where the problem is?
Update:
Here is the <sites>
section of the web.config (via showconfig.aspx). This is after applying suggestions from the answers to date, i.e. adding targetHostName and making the main site last in the order of site entries.
<sites>
<site name="shell" virtualFolder="/sitecore/shell" physicalFolder="/sitecore/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" loginPage="/sitecore/login" content="master" contentStartItem="/Home" enableWorkflow="true" enableAnalytics="false" xmlControlPage="/sitecore/shell/default.aspx" browserTitle="Sitecore" htmlCacheSize="2MB" registryCacheSize="3MB" viewStateCacheSize="200KB" xslCacheSize="5MB" />
<site name="login" virtualFolder="/sitecore/login" physicalFolder="/sitecore/login" enableAnalytics="false" database="core" domain="sitecore" disableXmlControls="true" />
<site name="admin" virtualFolder="/sitecore/admin" physicalFolder="/sitecore/admin" enableAnalytics="false" enableWorkflow="true" domain="sitecore" loginPage="/sitecore/admin/login.aspx" />
<site name="service" virtualFolder="/sitecore/service" physicalFolder="/sitecore/service" />
<site name="modules_shell" virtualFolder="/sitecore modules/shell" physicalFolder="/sitecore modules/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" content="master" enableAnalytics="false" enableWorkflow="true" />
<site name="modules_website" virtualFolder="/sitecore modules/web" physicalFolder="/sitecore modules/web" rootPath="/sitecore/content" startItem="/home" language="en" database="web" domain="extranet" allowDebug="true" cacheHtml="true" />
<site name="ga_website" virtualFolder="/" physicalFolder="/" hostName="medicare.martinspoint.local" targetHostName="medicare.martinspoint.local" rootPath="/sitecore/content/GA" startItem="/home" database="web" domain="HQ" allowDebug="true" cacheHtml="false" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" loginPage="http://martinspoint.local/account/login" />
<site name="groupplan_website" virtualFolder="/" physicalFolder="/" hostName="groupplan.martinspoint.local" targetHostName="groupplan.martinspoint.local" rootPath="/sitecore/content/GroupPlan" startItem="/home" database="web" domain="HQ" allowDebug="true" cacheHtml="false" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
<site name="hcc_website" virtualFolder="/" physicalFolder="/" hostName="healthcarecenters.martinspoint.local" targetHostName="healthcarecenters.martinspoint.local" rootPath="/sitecore/content/HCC" startItem="/home" database="web" domain="HQ" allowDebug="true" cacheHtml="false" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
<site name="usfhp_website" virtualFolder="/" physicalFolder="/" hostName="tricare.martinspoint.local" targetHostName="tricare.martinspoint.local" rootPath="/sitecore/content/usfhp" startItem="/home" database="web" domain="HQ" allowDebug="true" cacheHtml="false" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" loginPage="http://martinspoint.local/account/login" />
<site name="my_martinspoint_website" virtualFolder="/" physicalFolder="/" hostName="connect.martinspoint.local" targetHostName="connect.martinspoint.local" rootPath="/sitecore/content/mymartinspoint" startItem="/home" database="web" domain="HQ" allowDebug="true" cacheHtml="false" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
<site name="martinspoint_website" virtualFolder="/" physicalFolder="/" hostName="martinspoint.local" targetHostName="martinspoint.local" rootPath="/sitecore/content/martinspoint" startItem="/home" database="web" domain="HQ" allowDebug="true" cacheHtml="false" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/home" database="web" domain="HQ" allowDebug="true" cacheHtml="false" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
<site name="scheduler" enableAnalytics="false" domain="sitecore" />
<site name="system" enableAnalytics="false" domain="sitecore" />
<site name="publisher" domain="sitecore" enableAnalytics="false" enableWorkflow="true" />
</sites>
The result of
Sitecore.Links.LinkManager.GetItemUrl
is determined by theLinkProvider
which is configured in your config, here:You vendor has probably overridden that setting with a custom provider.