Upload
nonlinear-creations
View
1.519
Download
1
Embed Size (px)
DESCRIPTION
The Sitecore Customer Experience Platform comes with powerful multi-site capabilities, but following a few key best practices can ensure your deployment is high-performing, efficient, scalable and easy to maintain. We will cover tips and tricks to a robust multi-site architecture in Sitecore.
Citation preview
Sitecore Multi-Site ImplementationsBest Practices
Prepared by: Eduardo Moraes and Roberto Barbedo
Sitecore Multi-Sites Best Practices
• What is recommended by Sitecore
• Challenges, solutions and recommendations from the Community
The Nonlinear way
Q&A
Sitecore and Multi-sites
So you want multiplesites running in your Sitecore instance, eh?
Out-of-the-box
• Multi-site support
• A default Sitecore installation defines a single published web site. However, Sitecore ships with a number of logical web sites defined in web.config.
• These are: shell, login, testing, admin, modules_shell, modules_website, website, scheduler, system, publisher
• New sites can be added to web.config under <sites> node
How to add a new site
• Under <sites> node
<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/home" language="en" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" enablePreview="true" enableDebugger="true" />
How?
• Sitecore determines the site context based on the incoming URL and the following attributes:
1. hostName2. virtualFolder (and physicalFolder)
In other words, the hostName and virtualFolder attributes define a unique site in Sitecore.
Example
• Under <sites> node <site name="mynewsite" hostName="www.mynewsite.com" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/mynewsite" startItem="/homepage" language="en" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" enablePreview="true" enableDebugger="true" />
No problemo, right?
Well… not exactly.
So… what’s the “problem” with that?• Changes to web.config will cause an application restart
- Requires a developer to add the configuration settings
- Same application pool for all sites
- Application pool restart
- Session state will be lost
- IIS log files are the same for all sites
- Unique robots.txt and sitemap.xml for all sites
- Other “hidden” problems… internal links, search results, modules, security
Some solutions...
Available on marketplace.sitecore.net
• Makes it possible to add and configure multiple sites from inside the Sitecore client without editing the web.config file
- For a long time was limited to a single server; version 3.1.2 should have it solved.
- Still same application pool for all sites
- Of course… still requires updates to hosts file and IIS binding
Isolating a site• It is possible to add multiple IIS sites pointing to the same Sitecore instance
(physical website folder)
- Gives you separate application pools for each site
- Gives you an IIS log file for each site
• This configuration is NOT recommended by Sitecore
- All IIS sites are sharing the same data folder (possible issues with log files)- All IIS sites are sharing the same database (inconsistent memory cache)- Unknown side effects (not fully supported/tested by Sitecore)
Site isolation Sitecore’s recommendation
Sitecore recommends that instead of having each IIS site pointing to the same installation folder, you duplicate the installation folder for each IIS site.
It ensures that Sitecore log files are updated correctly, and similar issues are avoided.
“This setup, however, requires that you have a runtime license for each site.”
http://sdn.sitecore.net/Articles/Administration/Configuring%20Multiple%20Sites/Multiple%20IIS%20Sites.aspx
Robots.txt and Sitemap.xml• Independent sitemap xml files for search engines can be generated with the
version 2.0 of the Sitemap XML module available at:
- https://marketplace.sitecore.net/Modules/Sitemap_XML.aspx
• Independent robots.txt can also be served for each site using the approach suggested in the sitecoreclimber blog:
- http://sitecoreclimber.wordpress.com/2014/07/27/sitecore-multisite-robots-txt/
Best Practices:Recommend by the Community
#1. Configuration: Use patch files for site definitions
• Sitecore provides an example SiteDefinition config file
SiteDefinition.config.example
An example of how we do it at Nonlinear will follow during our demo.
#2. Separate site configuration items and global configuration items
• Each site should have its own configuration setting items
• Configuration settings that are common for all sites should be shared in a global settings folder
#3. Content: Separate page components, site components and global components
• Components that are common for all sites should stay in a global shared folder
• Components that are common for various pages inside a site should stay in a site folder
• Page specific components should reside in a page (item) level components folder
#4. Keep all site specific content under a site level home node
• It facilitates the assignment of security settings to ensure only users of that site will have access to it
#5. Organize templates in site specific template folders
#6. Organize layouts and sub-layouts in site specific folders
#7. Organize your Media Library items in site specific media folders
• Media items that are shared with all sites can be maintained in a global media folder
#8. Make sure internal links are considering different site domains
• Rendering.SiteResolving in web.config must be set to true
• hostName must be properly set
#9. When sharing workflows between sites, combine it with role based content access
Example:• User A wants to edit and submit content for site A only• He would need to have access to the Edit state of the workflow
AND be part of the a role created to give him access to edit site A and its descendents
#10. Make sure to configure the indexes for each site
• Lucene or SOLR indexes should be configured for each site
Demo - “the Nonlinear way”
The Nonlinear way - Keystone for Sitecore
• Keystone is a development accelerator for Sitecore, Keystone is the result of 100s of site implementations.
• It is ready for multi-sites
Use patch to add site configurations
Naming conventions for config files
Content - Shared x Exclusive
Components
Rules
The rules engine in sitecore can be very useful to uncouple multi-site implementations
• Insert Options• Placeholder Settings• Even RTE CSS definition
Insert Options
Same template, different insert options
Resources
Sitecore CommunityUpdates on the multiple sites module to support multiple CD done on version 3.1.2 by niket.ashesh:
http://blog.xcentium.com/2013/09/sitecore-multiple-sites-manager/
Another way of organizing page level components, as suggested by Toby Gutierrez:http://www.awareweb.com/awareblog/8-15-14-SitecoreArchScalability
Enable Multi-level Site Property Inheritance by Pascal Mathys:http://sitecore.unic.com/2014/08/08/enable-multi-level-site-property-inheritance
Sitecore Managed Sites as Virtual Folders by Mark Ursinohttp://firebreaksice.com/sitecore-managed-sites-as-virtual-folders/
Robots.txt multiple sites approach suggested by Vlad Iobagiu:http://sitecoreclimber.wordpress.com/2014/07/27/sitecore-multisite-robots-txt/
Multisites resource index compiled by John West:http://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/10/Sitecore-Multisite-Part-0-Resource-Index.aspx
Toolshttps://marketplace.sitecore.net/en/Modules/Multisite_Quickstart.aspx
https://marketplace.sitecore.net/en/Modules/Multisite_AliasResolver.aspx
https://marketplace.sitecore.net/en/Modules/Multiple_Sites_Manager.aspx
https://marketplace.sitecore.net/Modules/Sitemap_XML.aspx
• Keystone for Sitecore: http://keystoneforsitecore.com/
Questions?
Thank You!Eduardo Moraes - Senior Consultant Sitecore MVP
@eduardomoraesblog: http://pageditor.wordpress.com/
Roberto Barbedo - Certified Sitecore Developer @RobertoBRBRblog: http://www.sitecoreinsight.com/