Microsites leaking homepage
a
I'm having an issue with one of my client websites. Essentially he has some microsites and whenever you are on one of the microsites and you access a path that has the name of the other microsite, instead of seeing a 404 you see the other microsite homepage. For example microsite1.com microsite2.com If you go to microsite1.com/microsite2 (you see the homepage for microsite2.com instead of a 404) The same happens the other way around. We are using Umbraco 13, has anyone encountered this issue before?
h
Does each micro-site have it's own top level node at the root? Or do all the sites sit under the same node? Also look where the "cultures and hostnames" are configured for each microsites domain, they might be on the same node? It sounds like they haven't been 'separated' correctly unless there is a bug.
a
also if you open the node and go to the info you can see that it has only those 2 links theres no link pointing to otherdomain/thisdomain https://cdn.discordapp.com/attachments/1240987844621897788/1241040619464429598/image.png?ex=6648c0a5&is=66476f25&hm=38bf8be2a82a6e2919b561d5a4e6d6bfb6cb6dae7fcc10399861b84fc7489d26&
h
Ah, does each site just have an that "/" on its own? I think that might be causing it
Actually I am not so sure, my site returns /website even when I remove it, this site is setup to send 404s to the homepage so it doesn't help with testing 😅
Unfortunately I don't have a micosite type site at the moment to test it on
a
No problem, thanks for trying. We found out that other project with microsites is showing the same behavior... Either is a bug on the way our boilerplate is setup or it's something on Umbraco itself
Will update here if we find anything on this matter
j
There's an appsetting for that! The default for Umbraco is to run with routing that would work for multiple top-level nodes at
/node1
,
/node2
etc. (yeah, it's a feature, not a bug 😉). You can (and should) turn that off for multi-site setups. Set HideTopLevelNodeFromPath to false and you'll get the functionality that you are expecting. appsettings.json:
Copy code
json
  "Umbraco": {
    "CMS": {
      "Global": {
        "HideTopLevelNodeFromPath": false,
Docs: https://docs.umbraco.com/umbraco-cms/reference/configuration/globalsettings#hide-top-level-nodes-from-path
12 Views