If you want to run two sites on the Sitecore platform then you can configure two sites in one Sitecore instance and for that, you don't have to buy another license for it.
Let see how can we set up the two site.
Suppose you have two sites in the same Sitecore instance as shown in the screenshot below:

For the demo purpose, we will run the first site on domain http://local-helix-sitecore.dev.local/ and second site we will run on https://local-helix-basic-unicorn.dev.local/
- Create a Sitecore definition patch configuration file (SiteDefinition.config) in the \App_Config\Include\Project folder (you can put the config in any your custom folder inside the Include folder)
- Below are the contents of the config file for setting up the two sites (present in the same Sitecore instance) on a different domain.

- Finally, you have to make the host entry for each domain in the host file as following
Below is the complete config file:
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<sites>
<site name="basic-company"
inherits="website"
hostName="basic-company"
targetHostName="local-helix-basic-unicorn.dev.local"
rootPath="/sitecore/content/Basic Company"
dictionaryDomain="{B741B17B-67B2-4DD8-A216-D092813871F0}"
patch:before="site[@name='website']" />
<site name="SitecoreSite" patch:after="site[@name='website']"
targetHostName="local-helix-sitecore.dev.local"
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" />
</sites>
<settings>
<setting name="Media.RequestExtension" set:value="" />
<setting name="Media.RequestProtection.SharedSecret" set:value="CA972DAE5E21D2D65C945DD21D489" />
</settings>
</sitecore>
</configuration>
Once you setup the config you will be able to access the site on different domains (as mentioned in the SiteDefinition.config)
Screenshot first site (see domain):
Screenshot second site (see domain):
Have any doubt?
Email: prashant.tomar@hotmail.com
https://sitecorepeanuts.blogspot.com/2020/08/sitecore-multisite-configuration.html
ReplyDelete