I've multisite solution setup, and sites config looks like below:
<sites>
<site name="localhost" hostName="local.com" scheme="http" notFoundItem="not-found" enableTracking="true" virtualFolder="/product" physicalFolder="/website" targetHostName="local.com" rootPath="/sitecore/content/local" startItem="/login" database="web" domain="extranet" allowDebug="true" cacheHtml="false" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false"/>
<site name="localhostaccount" hostName="localaccount.com" scheme="http" notFoundItem="not-found" enableTracking="true" virtualFolder="/product" physicalFolder="/website" targetHostName="localaccount.com" rootPath="/sitecore/content/localaccount" startItem="/login" database="web" domain="extranet" allowDebug="true" cacheHtml="false" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false"/>
<site name="website" enableTracking="true" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/home" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="50MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="25MB" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" cacheRenderingParameters="true" renderingParametersCacheSize="10MB" patch:source="Sitecore.LanguageFallback.config" language="en" itemwebapi.mode="Off" itemwebapi.access="ReadOnly" itemwebapi.allowanonymousaccess="false" enableItemLanguageFallback="false" enableFieldLanguageFallback="false"/>
<site name="scheduler" enableTracking="false" domain="sitecore" patch:source="Sitecore.config"/>
<site name="system" enableTracking="false" domain="sitecore" patch:source="Sitecore.config"/>
<site name="publisher" domain="sitecore" enableTracking="false" enableWorkflow="true" patch:source="Sitecore.config"/>
</sites>
When I add links of one site in another, the hostname is not resolved in the url. Necessary site resolving config is done. Am I missing anything here?
-->
<setting name="Rendering.SiteResolving" value="true" />
<!-- RENDERING - SITE RESOLVING MATCH CURRENT LANGUAGE
Affects how cross-site links are rendered when Rendering.SiteResolving is enabled.
If true, the link provider will take the language attribute of the site definitions into consideration when resolving
which site/hostname to use when rendering a cross-site link.
Default value: true
-->
<setting name="Rendering.SiteResolvingMatchCurrentLanguage" value="true" />
<!-- RENDERING - SITE RESOLVING MATCH CURRENT SITE
Affects how cross-site links are rendered when Rendering.SiteResolving is enabled.
If true, the link provider will check if the target item is located under the start item for the current site before it
tries to find a match in the full list of site definitions. This ensures that when the target item can be resolved using
the current site, the target link will not change to a different site/hostname.
Default value: true
-->
<setting name="Rendering.SiteResolvingMatchCurrentSite" value="true" />
<!-- USE SERVER-SIDE REDIRECT FOR REQUEST ERRORS
If true, Sitecore will use Server.Transfer instead of Response.Redirect to redirect request to service pages
when an error occurs (item not found, access denied etc).
Default value: false
-->