The Problem Recently, we encountered a weird problem where one of our sites in Experience Editor will resolve to default website and not to the correct site. This happened when an author or developer opened Content Editor and tried to select one of the pages in the SXA site and then clicked on Experience Editor in Publish tab to open the page in Experience Editor, the page opened with the following errors - On checking the logs, we found that logs contains following entries for each SXA site - We never saw these kind of errors earlier in our logs. The Solution We started validating what is wrong with our site definitions. To our surprise, everything configured in site definitions appeared normal except the fact that a recent change was introduced to enable Enforce version presence. We soon found out a KB from Sitecore talking about the same problem - https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1002873 According to it - An SXA site might not be resolved
This blog is created to serve as a repository of quick tips for Sitecore developers. I have learnt a lot from the programming community and this is my attempt to give back to the community.