Sitecore Best Practice Series:


Sitecore “Gotchas” – Good Things To Know


# Practice Rationale
1. Avoid using aliases in multi-site environments Aliases are context independent, therefore a single alias is shared by all websites (use 301 Redirect module instead).
2. Set languageEmbedding to “always” or “never” Sitecore does it’s best to detect languages based on several factors, and it may or may not embed the language abbreviation into the URL when it is unsure. Set the languageEmbedding attribute of the link provider to “always” or “never” to make sure links remain consistent.
3. Backup filesystem and databases before .zip module installation Sitecore doesn't allow uninstalling content, thus, either create a backup, or create an anti-package before installing .zip packages.
4. Switch CodeBehind to CodeFile in sublayouts If you are still on .NET Web Form, Sitecore reloads the whole application after a change in configuration files or the /bin folder, resulting in slow subsequent loads. Change the control definition of the .ascx file to use the .cs file instead of the compiled DLL by using CodeFile instead of CodeBehind to avoid such resets. If you are working on a quick .aspx PoC - simply use inline C#.
5. Make sure all important actions are logged Sitecore does not log all activity out of the box, thus, make sure that adequate logging is added custom, if needed.
6. Include related items when publishing several related items This practice helps avoid issues with partial publishes, which may result in outdated content or even broken pages.
7. Enforce unique item field name requirement Sitecore allows having multiple items fields with the same name, which may lead to wrong data being served when accessed through code.
8. Enforce unique item name requirement Sitecore allows having multiple sibling items with the same name, when accessing these items via a URL, the first item in the content tree will always be served.
9. Use short item names in deep content structures Sitecore path is restricted to 256 characters, plus you may also run into path limits when serializing content.