Steps to be Performed after Multisite Configuration
In my previous blog, I discussed Multisite in Sitecore 10. In continuation of that blog, in this blog, I am going to discuss what are the other important things we need to take care of while renaming or adding a site.
-
Add entries to the <cacheSizes> section for site-specific:
For the default site named website, Sitecore adds cache sizes for the website site. While working on the multisite we set up one more site with a different name. Then you need to add a section with the site name and add the caching values for that site.
Example: Your site name is Site1 then create a patch file and add the below configuration:
-
Update the Preview.DefaultSite setting value for the additional Site:
This setting specifies the default site to be used in Preview mode. For example, if you rename the standard 'website' site, and add e.g., site1, please change the setting in the following way:
-
Creating Site-Specific Pipelines for Multi-Site Implementation in
Sitecore:
Pipelines provide you with a way to customize the Sitecore and run for all the requests. In multisite there can be scenarios where you want to execute the piece of code for the specific site, then you need to check the Site name before your logic. There can be multiple ways to handle it but I am just letting you know the easiest way.
For further reading about it, you can refer to the blog post:Creating Site Specific Pipelines for Multi-Site Implementation in Sitecore
-
Configuring domains:
Sitecore domains are logical security groupings. Create a patch file and add the domain:
-
Make sure your site is listed under the ClearCache handler under the publish:end and publish:end:remote events (Not Require):
Sitecore clears the cache upon each publishing. The Cache Clearer is bound to specific sites. So if you add a new site where caching is important or rename the standard "website" site, you should also add/rename appropriate sites under the publish:end event in the <events> section.
Earlier we need to take care of the Cache Clear handler but after Sitecore 9.3 release Sitecore automatically clears the HTML cache for the sites and does not require the above additional configuration.
See the document for more details: Configure HTML caching
-
Cross-origin Issue in Sitecore Multisite
If you faced the cross-origin issue while accessing the API with website-b then see the document for more details: Cross-origin Issue in Sitecore Multisite
-
Sitemap.xml and Robots.txt
See blog post: Sitemap and Robots in Sitecore Multisite
Happy Sitecoreing 😊
Comments
Post a Comment