Happy New Year 2020 to you and your family. Have a nice year a head 🙂
Sitecore provides multi-site as an out of the box feature. We can use this feature in case our client has number of sites and s/he is willing to have all on Sitecore then using one Sitecore license, we can configure all these sites with minimal efforts.
We will create one more site and will name it as ‘local.sitecore92.com’.
Creating a new site in Sitecore instance (e.g. http:// local.sitecore92.com) involves three step process:
Configure your site hostname in Sitecore Instance. There are two ways to add new site in your Sitecore instance.
1) Add <site> element under <sites> section in sitecore.config file (C:\inetpub\wwwroot\SitecoreDemo.sc\App_Config\Sitecore.config)
2) Add <site> element under <sites> section in SiteDefintion.config file
You will find SiteDefintion.config.example file at C:\inetpub\wwwroot\SitecoreDemo.sc\App_Config\Include\Examples\.
You need to copy this file in the Include folder and remove the .example extension in order to use.
Now you may be wondering which one is good option. It is good to add new site in SiteDefinition.config file because it’s always advisable not to touch default config files and override your custom settings in config files situated under App_Config folder provided by Sitecore.
After adding new site in config file, there are two more steps need to be performed out of Sitecore to access newly added site.
Add your site hostname in IIS binding
Add your site hostname in hosts file (under WINDOWS\System32\drivers\etc\ folder)
After completing these three steps your newly added Sitecore website is ready to access.
In this blog, we learnt to create multi site in the existing Sitecore instance.
Thank you.. Keep Learning.. Keep Sitecoring.. 🙂